Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Friday, August 29, 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: first row in datagrids
Bob Nerren
Posts: 19
 
first row in datagridsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Sep 09 9:42 PM
I'm trying to built an app that will roll through rows selected on several datagrids, and perform an edit on each record that the user has selected. My problem is how to get around the first row being selected on datagrids on form open. I'm on 7.5, and for the life of me, I can't figure out a way to deselect the first rows on the grids - or just some way to know if the user selected the first row, versus it just being selected.

There must be a way to do this, since a user selecting rows or a grid and clicking a button to have it do something to those records would be a common interface design. Can anyone help?
[Reply][Quote]
Raul A. Chavez
Posts: 1300
Top 10 forum poster: 1300 posts
 
Re: first row in datagridsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 01 Sep 09 11:19 PM
Add a Global variable to use as a flag. Only populate it if the OnChangeNode event has fired...
Typically, this event doesn't fire when the grid loads or when a Refresh is called.

E.g.

Dim blUserHasChangedNode

Sub AXFormChange(Sender)
'Before any initialization code..
' Also, if you are manually refreshing the grid anywhere and/or after Adding/Editing Deleting, set this variable to false.
blUserHasChangedNode = false
End Sub


Sub YourRoutineToUpdateData
If blUserHasChangedNode then
'Put all of your processing inside this if statement

'Once done, set the variable to false
blUserHasChangedNode = false
End If
End Sub

Sub MyDataGridChangeNode(Sender)
blUserHasChangedNode = true
End Sub
[Reply][Quote]
Bob Nerren
Posts: 19
 
Re: first row in datagridsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Sep 09 8:36 AM
This makes perfect sense, Raul. Knew there had to be a way to do this. Thanks a lot.
[Reply][Quote]
Bob Nerren
Posts: 19
 
Re: first row in datagridsYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 02 Sep 09 9:14 AM
One gotcha with this but an easy solution. The first row is selected on form open so it doesn't fire the change node event. So if the user happens to select the first row, the script won't see it as selected. What I'm going to do is check the datagrids when they load using getcurrrentfield("") to get the id for the first frow and then if the user clicks on the datagrid, I'll check to see if it's the same id and if so, set the changenode global variable to true.

Just wanted to update in case someone finds this post for a solution to this problem. Thanks again, Raul.
[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): 8/29/2025 5:23:39 PM