SortCommand and PageIndexChange event not firing

  • Thread starter sa siva via .NET 247
  • Start date
S

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 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.
 
J

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
 
C

Cole Trickle

I think I read somewhere that the viewstate needs to be enabled for the
events to work
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top