Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > SortCommand and PageIndexChange event not firing

Reply
Thread Tools

SortCommand and PageIndexChange event not firing

 
 
sa siva via .NET 247
Guest
Posts: n/a
 
      03-24-2005
hi, I have a datagrid in which I have enabled sorting and paging.I have specified event handlers for sorting and pageindexchangeevents. I have disabled the viewstate of the grid. Now those 2events are not getting fired when i try to sort by clicking onthe column header link or when trying to change the page byusing the 'next' link automatically provided by the grid. Onlywhen the grid's viewstate is enabled, those events are gettingfired. But I want to capture those events even when the grid'sviewstate is disabled. pls provide me a solution.

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

<Id>vB7rLSmv506+8V0GQGFDMA==</Id>
 
Reply With Quote
 
 
 
 
Jason Bentley
Guest
Posts: n/a
 
      03-24-2005
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

 
Reply With Quote
 
 
 
 
Cole Trickle
Guest
Posts: n/a
 
      05-05-2005
I think I read somewhere that the viewstate needs to be enabled for the
events to work

"Jason Bentley" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.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
>



 
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
SortCommand not firing on DataGrid, EVENTTARGET="," Leaf ASP .Net Datagrid Control 2 06-13-2005 01:42 AM
SortCommand not firing EatHam ASP .Net 0 01-21-2004 10:50 PM
ItemCommand firing instead of SortCommand Steven ASP .Net 4 10-25-2003 12:30 AM
DataGrid SortCommand not firing using code-behind?? Ken Tucker ASP .Net Datagrid Control 2 07-06-2003 03:59 AM
DataGrid SortCommand not firing using code-behind?? Ken Tucker ASP .Net 2 07-06-2003 03:59 AM



Advertisments