Home All Groups Group Topic Archive Search About

SortCommand and PageIndexChange event not firing

Author
24 Mar 2005 1:55 PM
sa siva via .NET 247
hi, I have a datagrid in which I have enabled sorting and paging. I have specified event handlers for sorting and pageindexchange events. I have disabled the viewstate of the grid. Now those 2 events are not getting fired when i try to sort by clicking on the column header link or when trying to change the page by using the 'next' link automatically provided by the grid. Only when the grid's viewstate is enabled, those events are getting fired. But I want to capture those events even when the grid's viewstate is disabled. pls provide me a solution.

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>vB7rLSmv506+8V0GQGFDMA==</Id>

Author
24 Mar 2005 4:47 PM
Jason Bentley
Make sure your events are 'wired' in InitializeComponent(). This is
usually the culprit. Also, it could be a databinding event. As a last
possibility, add an empty column to the datagrid:
<asp:BoundColumn></asp:BoundColumn>. And then remove it after you build
the project. It is a flake in VS.NET but none of these items work, post
your code.

Jason Bentley
http://geekswithblogs.net/jbentley
Author
5 May 2005 3:07 PM
Cole Trickle
I think I read somewhere that the viewstate needs to be enabled for the
events to work

Show quoteHide quote
"Jason Bentley" <ims***@gmail.com> wrote in message
news:1111682873.205579.92340@z14g2000cwz.googlegroups.com...
> Make sure your events are 'wired' in InitializeComponent(). This is
> usually the culprit. Also, it could be a databinding event. As a last
> possibility, add an empty column to the datagrid:
> <asp:BoundColumn></asp:BoundColumn>. And then remove it after you build
> the project. It is a flake in VS.NET but none of these items work, post
> your code.
>
> Jason Bentley
> http://geekswithblogs.net/jbentley
>