Welcome Guest Search | Active Topics | Sign In | Register

Grid Primary Key Column Options
Alejandro M. Biondo
Posted: Monday, May 31, 2010 11:52:18 AM
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?

eo_support
Posted: Monday, May 31, 2010 2:27:37 PM
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!
Alejandro M. Biondo
Posted: Tuesday, June 1, 2010 5:22:00 AM
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?
eo_support
Posted: Tuesday, June 1, 2010 7:32:41 AM
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


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.