Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, July 5, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Edit certain rows in datagrid
SLX_Novice
Posts: 246
 
Edit certain rows in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 May 11 12:45 PM
fiogf49gjkf0d

Hi all.


I have a datagrid (datagrid1) that has rows with the following data: Carrier, UpdateFreight (it's a checkbox), Notes


I want to be able to edit only the rows that have ACTIVE Carriers (that information is found in another table myCarriers), if the row contains a Carrier that is INACTIVE then do not allow the user to edit that row (i.e. fill in or clear the checkbox or add notes).


SLX LAN 7.2.1


Thanks!

[Reply][Quote]
Mike Spragg
Posts: 1226
Top 10 forum poster: 1226 posts
 
Re: Edit certain rows in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 May 11 5:23 PM
fiogf49gjkf0d

The grid has events associated with it - the one you need is OnRowSelect.


Simply test the grid row:


Function yourDataGridEditing(Sender, PrimaryKeyValue, FieldName, Value)


If uCase(yourDataGrid.GetCurrentField("CARRIER")) = "INACTIVE" then
  yourDataGridEditing = False
Else
 yourDataGridEditing = True
End If


End Function


 


 

[Reply][Quote]
SLX_Novice
Posts: 246
 
Re: Edit certain rows in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 11 8:32 AM
fiogf49gjkf0d

Thanks Mike.


I looked at the events available and I didn't find the "BeforeEdit" event, there was however an "OnEdited".


Below is the code I used, I tried making 2 of the columns (which are checkboxes) readonly but it's not working:


Function DataGrid1Edited(Sender, PrimaryKeyValue, FieldName, Value)


If Datagrid1.GetCurrentField("CARRIER") = "INACTIVE" then
datagrid1.Columns.Item(1).ReadOnly = True
datagrid1.Columns.Item(2).ReadOnly = True
Else
datagrid1.Columns.Item(1).ReadOnly = False
datagrid1.Columns.Item(2).ReadOnly = False
End If

[Reply][Quote]
SLX_Novice
Posts: 246
 
Re: Edit certain rows in datagridYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 24 May 11 8:44 AM
fiogf49gjkf0d

Disregard my previous post, I got it to work as you suggested by using the "OnRowSelect" event.


Thanks Mike!

[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 7/5/2025 6:49:43 AM