SortCommand and PageIndexChange event not firing

Discussion in 'ASP .Net Datagrid Control' started by sa siva via .NET 247, Mar 24, 2005.

  1. 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>
     
    sa siva via .NET 247, Mar 24, 2005
    #1
    1. Advertising

  2. 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
     
    Jason Bentley, Mar 24, 2005
    #2
    1. Advertising

  3. sa siva via .NET 247

    Cole Trickle Guest

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

    "Jason Bentley" <> wrote in message
    news:...
    > 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
    >
     
    Cole Trickle, May 5, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. EatHam

    SortCommand not firing

    EatHam, Jan 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    581
    EatHam
    Jan 21, 2004
  2. Ken Tucker
    Replies:
    2
    Views:
    2,572
    Ken Tucker
    Jul 6, 2003
  3. Fabio Mastria
    Replies:
    1
    Views:
    406
    Fabio Mastria
    Apr 3, 2008
  4. Ken Tucker

    DataGrid SortCommand not firing using code-behind??

    Ken Tucker, Jul 5, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    206
    Ken Tucker
    Jul 6, 2003
  5. Leaf

    SortCommand not firing on DataGrid, EVENTTARGET=","

    Leaf, Jun 8, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    187
Loading...

Share This Page