Rank: Advanced Member Groups: Member
Joined: 6/4/2008 Posts: 38
|
Hello,
I'm working with the Data Grid control and the index property. I want the get the index of the selected row but my escenario is the following:
I load my grid with an SQL query with fields
Id (Index) Column1 Column2 Column3
But I make not visible the Id column, so I want when I select a row and a button is clicked something happens getting my id of the selected row.
Can I set the index to my own column instead of the index of the whole grid ?
Thanks a lot for your support.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You would set the Grid's KeyField property to the name of your ID field. You can then access this value either on the server side through GridItem.Key property or on the client side through GridItem.getKey method.
Thanks
|