8/29/2025 4:37:10 PM
|
|
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!
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.
|
|
|
|
first row in datagrids
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? |
|
|
|
Re: first row in datagrids
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 |
|
|
|
Re: first row in datagrids
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. |
|
|
|
Re: first row in datagrids
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. |
|
|
|
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!
|
|
|
|
|
|
|
|