Advertisement

05.29.2008 at 05:31AM PDT, ID: 23441115
[x]
Attachment Details

ASP.NET GridView DataKeyName

Asked by abussie in .NET Framework 2.0, Programming for ASP.NET, Visual Studio .NET 2005

Tags: ASP.NET 2.0 C#, IE 6 or higher

I have a ASP.NET 2.0 Web application. I have a SQL Server 2000 Database as my backend. I'm using the gridview control with multiple key fields 9 to be exact. My question is what is the maximum number of key fields the gridview can hold in the DataKeyNames property.

The problem is when i update a record via the gridview I'm getting an error message saying you can't insert duplicate records. Its giving me the error because its not reading all of the Datakeys which is causing the error. Its reading say what ever the limit is an ignoring the final key which will cause the record to be unique.

Any suggestions on what is the  maximum number of key fields the gridview can hold in the DataKeyNames property.Start Free Trial
[+][-]05.29.2008 at 05:46AM PDT, ID: 21668478

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 05:53AM PDT, ID: 21668546

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.29.2008 at 05:53AM PDT, ID: 21668551

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: .NET Framework 2.0, Programming for ASP.NET, Visual Studio .NET 2005
Tags: ASP.NET 2.0 C#, IE 6 or higher
Sign Up Now!
Solution Provided By: dusion
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628