Welcome Guest Search | Active Topics | Sign In | Register

Grid Index Options
Paulo Mondragon
Posted: Monday, December 8, 2008 11:35:04 AM
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.
eo_support
Posted: Tuesday, December 9, 2008 5:55:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.