|
Rank: Newbie Groups: Member
Joined: 5/10/2010 Posts: 9
|
Hi.
Is there any way (without javascript programming) to set a column like it is an primary key?
I would like to set a column that I can assume that it has an unique value on the grid column. Is that possible, or I have to do it with javascript?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You can set the Grid's KeyField property. Once set, you can access the key value through each GridItem's Key property. However that's all it does and it does not have to be a primary key or related to any key in your db at all.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/10/2010 Posts: 9
|
So, if I want to make that column to be unique, I have to make javascript code? Isn't there a simplier method?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
The Grid does not offer any support to make sure your column value is unique. You will need to implement that by yourself, it can be JavaScript or code behind or DB restrains but it will be totally up to you.
Thanks
|
|