GridView EnableSortingAndPagingCallbacks

Discussion in 'ASP .Net Web Controls' started by swesorick@gmail.com, Nov 21, 2005.

  1. Guest

    I'm trying to figure out the Sorting and PagingCallbacks in the asp.Net
    2.0 GridView Control. Whenever I set EnableSortingAndPagingCallbacks
    to true, I cannot get sorting to work. Paging works, but not sorting.
    >From viewing the trace log, I can see that the page fires each time you

    click on a sorting link or paging link.

    The GridView sorting and paging events do not seem to fire when
    EnableSortingAndPagingCallbacks is set to true. Somehow the GridView
    is smart enough to switch the paging during the callback, but not
    switch the sorting. In the trace, I can even see the __CALLBACKID and
    __CALLBACKPARAM form variables. Unfortunately, I couldn't decipher how
    to read the __CALLBACKPARAM variable. What am I missing, here?

    <asp:GridView ID="grdCustomers" runat="server" AllowSorting="True"
    AutoGenerateColumns="False" AutoGenerateDeleteButton="True"

    AutoGenerateEditButton="True"
    EnableSortingAndPagingCallbacks="True"
    EnableViewState="True" AllowPaging="true">
    <PagerSettings NextPageText="next" PreviousPageText="back" />
    <Columns>
    <asp:BoundField DataField="CustomerName"
    HeaderText="Customer Name" SortExpression="CustomerName" />
    <asp:BoundField DataField="AccountNum" HeaderText="Axapta
    ID" SortExpression="AccountNum" />
    </Columns>
    </asp:GridView>
    , Nov 21, 2005
    #1
    1. Advertising

  2. freeflyrw Guest

    Hi, Same issue. Anyone any solution or input.
    Thanks.

    "" wrote:

    > I'm trying to figure out the Sorting and PagingCallbacks in the asp.Net
    > 2.0 GridView Control. Whenever I set EnableSortingAndPagingCallbacks
    > to true, I cannot get sorting to work. Paging works, but not sorting.
    > >From viewing the trace log, I can see that the page fires each time you

    > click on a sorting link or paging link.
    >
    > The GridView sorting and paging events do not seem to fire when
    > EnableSortingAndPagingCallbacks is set to true. Somehow the GridView
    > is smart enough to switch the paging during the callback, but not
    > switch the sorting. In the trace, I can even see the __CALLBACKID and
    > __CALLBACKPARAM form variables. Unfortunately, I couldn't decipher how
    > to read the __CALLBACKPARAM variable. What am I missing, here?
    >
    > <asp:GridView ID="grdCustomers" runat="server" AllowSorting="True"
    > AutoGenerateColumns="False" AutoGenerateDeleteButton="True"
    >
    > AutoGenerateEditButton="True"
    > EnableSortingAndPagingCallbacks="True"
    > EnableViewState="True" AllowPaging="true">
    > <PagerSettings NextPageText="next" PreviousPageText="back" />
    > <Columns>
    > <asp:BoundField DataField="CustomerName"
    > HeaderText="Customer Name" SortExpression="CustomerName" />
    > <asp:BoundField DataField="AccountNum" HeaderText="Axapta
    > ID" SortExpression="AccountNum" />
    > </Columns>
    > </asp:GridView>
    >
    >
    freeflyrw, Jan 20, 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. =?Utf-8?B?U3VuU21pbGU=?=

    EnableSortingAndPagingCallbacks run time setup bug?

    =?Utf-8?B?U3VuU21pbGU=?=, Mar 9, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    538
    =?Utf-8?B?U3VuU21pbGU=?=
    Mar 9, 2006
  2. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    17,956
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  3. =?Utf-8?B?RGVtZXRyaQ==?=

    GridView & EnableSortingAndPagingCallbacks

    =?Utf-8?B?RGVtZXRyaQ==?=, May 23, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    2,389
  4. how EnableSortingAndPagingCallbacks works?

    , May 24, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    653
    Brock Allen
    May 28, 2006
  5. MikeS
    Replies:
    4
    Views:
    337
    MikeS
    Nov 16, 2006
Loading...

Share This Page