HighTechTalks DotNet Forums  

DataGrid paging-- OnItemCommand not respecting page number?

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss DataGrid paging-- OnItemCommand not respecting page number? in the ASP.net Data Grid Control forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Steve Hershoff
 
Posts: n/a

Default DataGrid paging-- OnItemCommand not respecting page number? - 08-09-2006 , 05:06 PM






Hi everyone,

I'm using the paging feature in the DataGrid class for the first time, and
am having some trouble.

I have an asp button column in the DataGrid, and when I click on it my
OnItemCommand function fires just fine-- but for some reason the
DataGridCommandEventArgs parameter always thinks it's on the first page.

Say, for instance, I'm on page 33 of my DataGrid and I click the button
column in one of the records. The DataGridCommandEventArgs parameter, which
I call "e", should a value of 222 in cell[0]. Instead, I get a value of
111, which is the value from the corresponding record on page #1.

What am I doing wrong here? I'm letting the DataGrid handle the gritty
details itself--no custom paging from me-- yet the value of
e.Item.Cells[0].Text comes from page #1 no matter what page I'm on. As you
might guess, I'm a newbie when it comes to DataGrid paging so any advice you
have I'd be grateful for. Thanks!




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.