﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - WebGrid: Can you have more than  one DataKeyField?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Can-you-have-more-than-one-DataKeyField/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>WebGrid: Can you have more than  one DataKeyField?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Can-you-have-more-than-one-DataKeyField/</link><pubDate>Tue, 02 Mar 2010 23:38:12 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Hi Rob,&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;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.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;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.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; "&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid: Can you have more than  one DataKeyField?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Can-you-have-more-than-one-DataKeyField/</link><pubDate>Tue, 02 Mar 2010 11:57:19 GMT</pubDate><dc:creator>rdelloro</dc:creator><description>&lt;p&gt;Hi all,&lt;/p&gt;&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;How can I solve this issue?&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;</description></item><item><title>WebGrid: Can you have more than  one DataKeyField?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Can-you-have-more-than-one-DataKeyField/</link><pubDate>Tue, 15 Dec 2009 21:45:42 GMT</pubDate><dc:creator>julia</dc:creator><description>&lt;p&gt;Hi Jocelyn,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Julia&lt;/p&gt;</description></item><item><title>WebGrid: Can you have more than  one DataKeyField?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Can-you-have-more-than-one-DataKeyField/</link><pubDate>Tue, 15 Dec 2009 17:35:50 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;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 &lt;span style="font-size: 13px; color: #0000ff"&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #a31515"&gt;&lt;span style="font-size: 13px; color: #a31515"&gt;RootTable&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px"&gt; &lt;span style="color: #ff0000"&gt;&amp;gt;.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;&lt;span style="font-size: 13px; color: #0000ff"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid: Can you have more than  one DataKeyField?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Can-you-have-more-than-one-DataKeyField/</link><pubDate>Thu, 10 Dec 2009 22:55:27 GMT</pubDate><dc:creator>andi@intersoftpt.com</dc:creator><description>&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Hi Joycelyn,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 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, &lt;/span&gt;&lt;span style="font-size: 9pt"&gt;you just need to leave it blank, by default, it will be configured by it self.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I hope it helps and please do not hesitate to ask if you have any other questions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt"&gt;Thank you,&lt;br /&gt;Andi Santoso&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebGrid: Can you have more than  one DataKeyField?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/WebGrid-Can-you-have-more-than-one-DataKeyField/</link><pubDate>Thu, 10 Dec 2009 17:07:24 GMT</pubDate><dc:creator>jcrendulic</dc:creator><description>&lt;p&gt;&lt;span style="color: #000000"&gt;&lt;span style="color: #000000"&gt;&lt;span style="color: #000000"&gt;Can you specify more than 1 &lt;span style="font-size: 13px; color: #ff0000"&gt;&lt;span style="font-size: 13px; color: #ff0000"&gt;&lt;span style="color: #000000"&gt;DataKeyField in the RootTable tag?  I need to key off 2 values for this grid to make it unique.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>