SortCommend event is being fired twice

Discussion in 'ASP .Net Datagrid Control' started by Anup, Aug 1, 2006.

  1. Anup

    Anup Guest

    Hi Group,

    In my application I am using a datagrid, now I m implementing sorting
    for that datagrid,
    I am changing the flag for ascending and descending when SortCommand
    event of datagrid is fired.

    Now the problem I am facing is that the Sort Command event is being
    fired twice even if I click the header in datagrid only once thus my
    flag is getting reset to the original value.

    (I know that the event is first raised during the restoration of the
    page's view state. The second notification arrives when the page is
    being built.)
    (I am using .Net 1.1)

    Please help me out in this!!

    Thanks,

    Anup Daware
     
    Anup, Aug 1, 2006
    #1
    1. Advertising

  2. Anup

    Anup Guest

    Got the answer to this :)
    I registered the event as well as set the value of
    OnSortCommand="SortCommand......"
    so when I removed it from properties of datagrid the problem is solved

    Thanx,
    Anup Daware

    Anup wrote:
    > Hi Group,
    >
    > In my application I am using a datagrid, now I m implementing sorting
    > for that datagrid,
    > I am changing the flag for ascending and descending when SortCommand
    > event of datagrid is fired.
    >
    > Now the problem I am facing is that the Sort Command event is being
    > fired twice even if I click the header in datagrid only once thus my
    > flag is getting reset to the original value.
    >
    > (I know that the event is first raised during the restoration of the
    > page's view state. The second notification arrives when the page is
    > being built.)
    > (I am using .Net 1.1)
    >
    > Please help me out in this!!
    >
    > Thanks,
    >
    > Anup Daware
    >
     
    Anup, Aug 8, 2006
    #2
    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. Rick Lubanovic

    onbeforeunload event is fired twice

    Rick Lubanovic, Oct 30, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    844
    Rick Lubanovic
    Oct 30, 2003
  2. =?Utf-8?B?Tmltcm9kIENvaGVu?=

    Page_Load being fired twice

    =?Utf-8?B?Tmltcm9kIENvaGVu?=, May 27, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    766
    Steven Cheng[MSFT]
    Jun 9, 2004
  3. Anup
    Replies:
    2
    Views:
    928
    Anup Daware
    Aug 8, 2006
  4. Anup

    SortCommend event is being fired twice

    Anup, Aug 1, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    137
  5. Anup

    SortCommend event is being fired twice

    Anup, Aug 1, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    118
Loading...

Share This Page