Saturday, 15 June 2013

c# - error The GridView 'GridView1' fired event Sorting which wasn't handled -


I'm trying to create two groups in the data grid like this example, but there is an error and I do not know Whether it is the reason or how to solve it Enter image details here

The sorting event does not seem to be handled properly. You can handle it in the following way:

  & lt; Asp: GridView id = "GridView1" runat = "server" Allow = "true" honors = "GridView1_Sorting" & gt; & Lt; / ASP: GridView & gt; Protected Zero GridView1_Sorting (Object Sender, GridViewSortEventArgs e) {dataTable.DefaultView.Sort = e.SortExpression; GridView1.DataSource = DataTable; GridView1.DataBind (); }  

No comments:

Post a Comment