Groups | Blog | Home
all groups > asp.net webcontrols > november 2005 >

asp.net webcontrols : GridView EnableSortingAndPagingCallbacks


swesorick NO[at]SPAM gmail.com
11/21/2005 12:02:09 PM
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.
[quoted text, click to view]
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
1/20/2006 6:03:03 AM
Hi, Same issue. Anyone any solution or input.
Thanks.

[quoted text, click to view]
AddThis Social Bookmark Button