Datagrid - Mouse up or selection change
Posted: Mon Apr 28, 2014 11:38 am
Hi ,
I have a datagrid showing a list of records. The list is for viewing only and when the user selects a row I want to populate a number of fields and buttons with data from the selected row. I have created my own default column behavior based on the standard one. Into this I have added the following code :
The code reads the line number of the row where the mouse up occurs then it reads the data from the row into an array variable. Next it calls the routine DisplaySelectedRow on the card and passes it the array of data. It all seems to work. However, given that I treat datagrids with the same caution I would give to a nest of vipers is my code o.k. or have I introduced an as yet undetected "feature" ? Is there a better way of achieving the same result ?
Simon K
I have a datagrid showing a list of records. The list is for viewing only and when the user selects a row I want to populate a number of fields and buttons with data from the selected row. I have created my own default column behavior based on the standard one. Into this I have added the following code :
Code: Select all
On MouseUp
put the dgline of me into tline -- counts down the list not sure how this relates to the data
put the dgDataOfLine[tline] of me into tRecA
DisplaySelectedRow tRecA
pass MouseUp
end MouseUp
Simon K