iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Can you specify more than 1 DataKeyField in the RootTable tag? I need to key off 2 values for this grid to make it unique.
Hi Rob,
I am a bit confused on "Primary key with multiple column". Does it mean that you have more than one of Primary Key? I believe in every table of multiple columns must be have one PrimaryKey.
Here, I attached you a sample with Northwind database, I leave the DataKeyField blank as well and it runs just fine. I hope it helps. Thank you and have a nice day.
Best Regards,
Andi Santoso
Hi Joycelyn,
Actually DataKeyField is based on your Primary Key on database. You can add another key, but it will be stated as a ForeignKey. In DataKeyField, you just need to leave it blank, by default, it will be configured by it self. I hope it helps and please do not hesitate to ask if you have any other questions.
Thank you,Andi Santoso
I am not sure how to do this? We are binding to the Grid from a Dataset in the code behind page. What property would be set? I do not see ForeignKey as a property in the <RootTable >.
Hi Jocelyn,
As Andi said, if you have another PrimaryKey, you don't have to write it in DataKeyField. You just need to define the key in DataSet and WebGrid will be recognized automatically.
Regards,
Julia
Hi all,
If I leave DataKeyField Blank and i define a in the dataset a Primary key with multiple colum, Webgrid not recognized automatically the perimary key.
How can I solve this issue?
thanks
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname