I am trying to Create two groups In Data Grid like this example http://www.agrinei.com/gridviewhelper/gridviewhelper_en.htm but there are an error and I don't know what is the reason or how to solve it
Sorting event seems not handled properly here. You can handle it in following manner
<asp:GridView ID="GridView1" runat="server" AllowSorting="true"
OnSorting="GridView1_Sorting">
</asp:GridView>
protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)
{
dataTable.DefaultView.Sort = e.SortExpression ;
GridView1.DataSource = dataTable;
GridView1.DataBind();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With