Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Gridview DataKeys property not set when PageIndexChanged fires

Reply
Thread Tools

Gridview DataKeys property not set when PageIndexChanged fires

 
 
=?Utf-8?B?UmljayBEcm9za2U=?=
Guest
Posts: n/a
 
      12-13-2006
In the PageIndexChanged event of an ASP.Net 2.0 GridView the Rows property
has rows but the DataKeys property has 0 Items ?

This definitely seems like a bug to me. Has anyone come up with a good
workaround ?

--
Rick Droske
 
Reply With Quote
 
 
 
 
=?Utf-8?B?UmljayBEcm9za2U=?=
Guest
Posts: n/a
 
      12-13-2006
DataBinding the GridView again at the top of PageIndexChanged fixes it but
obviously not ideal. Hopefully its not actually causing another trip to the
SQL server....


--
Rick Droske


"Rick Droske" wrote:

> In the PageIndexChanged event of an ASP.Net 2.0 GridView the Rows property
> has rows but the DataKeys property has 0 Items ?
>
> This definitely seems like a bug to me. Has anyone come up with a good
> workaround ?
>
> --
> Rick Droske

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple composite control fires event fires first time but not second sellars.paul@googlemail.com ASP .Net Web Controls 3 05-13-2009 03:19 PM
GridView: DataKeys not available in RowDataBound! Benton ASP .Net 0 12-19-2006 07:30 PM
GridView.DataKeys appear not to be filled sevilsivle ASP .Net Web Controls 0 05-02-2006 09:36 AM
Gridview asp.net 2.0 datakeys not loading =?Utf-8?B?TGluZ28=?= ASP .Net 0 10-31-2005 06:13 PM
How to assign the DataKeys property of the datagrid programatically from a datasource? Alex ASP .Net 0 04-23-2004 08:10 PM



Advertisments