J
jobs
I have a gridview that is refreshes when a dropdown is selected outside
of it. Sorting is enabled on the gridview but not working.
I read that I should set EnableSortingandPagingCallback to true to fix
the error:
The GridView 'GridView1' fired event Sorting which wasn't handled
However, I am now getting:
Callbacks are not supported on CommandField when the select button is
enabled because other controls on your page that are dependent on the
selected value of 'RatePlanGridView' for their rendering will not
update in a callback. Turn callbacks off on 'RatePlanGridView'.
Paging on the gridview appears to work fine, because I added these:
Protected Sub RatePlanGridView_PageIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
RatePlanGridView.PageIndexChanged
.. and I rebind (but I don't see code to set the new page)
End If
Protected Sub RatePlanGridView_PageIndexChanging(ByVal sender As
Object, ByVal e As GridViewPageEventArgs) Handles
RatePlanGridView.PageIndexChanging
RatePlanGridView.PageIndex = e.NewPageIndex
RatePlanGridView.DataBind()
End Sub
I get the noted error under
Protected Sub RouteCodesList_SelectedIndexChanged
when I attempt to bind.
The gridview is configured as follows:
<asp:GridView ID="RatePlanGridView" runat="server"
AutoGenerateColumns="False" DataKeyNames="RouteCode"
Width="700px" SkinID="GridView"
AllowPaging="True" AllowSorting="true" ShowFooter="true"
PagerSettings-Mode="NumericFirstLast">
Is there an event for sorting I should set, and will I have to take of
sorting myself?
of it. Sorting is enabled on the gridview but not working.
I read that I should set EnableSortingandPagingCallback to true to fix
the error:
The GridView 'GridView1' fired event Sorting which wasn't handled
However, I am now getting:
Callbacks are not supported on CommandField when the select button is
enabled because other controls on your page that are dependent on the
selected value of 'RatePlanGridView' for their rendering will not
update in a callback. Turn callbacks off on 'RatePlanGridView'.
Paging on the gridview appears to work fine, because I added these:
Protected Sub RatePlanGridView_PageIndexChanged(ByVal sender As
Object, ByVal e As System.EventArgs) Handles
RatePlanGridView.PageIndexChanged
.. and I rebind (but I don't see code to set the new page)
End If
Protected Sub RatePlanGridView_PageIndexChanging(ByVal sender As
Object, ByVal e As GridViewPageEventArgs) Handles
RatePlanGridView.PageIndexChanging
RatePlanGridView.PageIndex = e.NewPageIndex
RatePlanGridView.DataBind()
End Sub
I get the noted error under
Protected Sub RouteCodesList_SelectedIndexChanged
when I attempt to bind.
The gridview is configured as follows:
<asp:GridView ID="RatePlanGridView" runat="server"
AutoGenerateColumns="False" DataKeyNames="RouteCode"
Width="700px" SkinID="GridView"
AllowPaging="True" AllowSorting="true" ShowFooter="true"
PagerSettings-Mode="NumericFirstLast">
Is there an event for sorting I should set, and will I have to take of
sorting myself?