SortCommand not firing on DataGrid, EVENTTARGET=","

Discussion in 'ASP .Net Datagrid Control' started by Leaf, Jun 8, 2005.

  1. Leaf

    Leaf Guest

    Greetings,

    I've read all there is on why SortCommand firing can fail in this
    group, and haven't found a solution. Essentially the SortCommand
    doesn't fire, no matter what I do. I've set the handler in code, put an
    OnSortCommand= in the HTML, tried all different initialization
    combinations, nothing. Oddly, on one of my pages it works great. On two
    others, it doesn't work at all.

    Here's what's weird - when I click on the header link for sorting, my
    __EVENTTARGET is equal to ",". When I hover over the link, I get the
    usual:

    javascript:__doPostBack('DataGrid1$_ctl1$_ctl0','')

    and when I look at the generated HTML, it all looks fine. But a
    breakpoint on Page_Load() reveals __EVENTTARGET is ",". On my working
    page, it is the proper "DataGrid1$:ctl1$:ctl0".

    I've got EnableViewState=True. Any thoughts?

    thanks, Leaf
    Leaf, Jun 8, 2005
    #1
    1. Advertising

  2. Leaf

    Scott M. Guest

    Are you sure that EnableViewState is on for BOTH the grid and the Page
    itself?


    "Leaf" <> wrote in message
    news:...
    > Greetings,
    >
    > I've read all there is on why SortCommand firing can fail in this
    > group, and haven't found a solution. Essentially the SortCommand
    > doesn't fire, no matter what I do. I've set the handler in code, put an
    > OnSortCommand= in the HTML, tried all different initialization
    > combinations, nothing. Oddly, on one of my pages it works great. On two
    > others, it doesn't work at all.
    >
    > Here's what's weird - when I click on the header link for sorting, my
    > __EVENTTARGET is equal to ",". When I hover over the link, I get the
    > usual:
    >
    > javascript:__doPostBack('DataGrid1$_ctl1$_ctl0','')
    >
    > and when I look at the generated HTML, it all looks fine. But a
    > breakpoint on Page_Load() reveals __EVENTTARGET is ",". On my working
    > page, it is the proper "DataGrid1$:ctl1$:ctl0".
    >
    > I've got EnableViewState=True. Any thoughts?
    >
    > thanks, Leaf
    >
    Scott M., Jun 10, 2005
    #2
    1. Advertising

  3. Leaf

    Leaf Guest

    Good thought - yep, both are set to true.
    Leaf, Jun 13, 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:
    570
    EatHam
    Jan 21, 2004
  2. Ken Tucker
    Replies:
    2
    Views:
    2,556
    Ken Tucker
    Jul 6, 2003
  3. Ken Tucker

    DataGrid SortCommand not firing using code-behind??

    Ken Tucker, Jul 5, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    194
    Ken Tucker
    Jul 6, 2003
  4. sa siva via .NET 247

    SortCommand and PageIndexChange event not firing

    sa siva via .NET 247, Mar 24, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    155
    Cole Trickle
    May 5, 2005
  5. biru
    Replies:
    2
    Views:
    229
Loading...

Share This Page