I am trying to program my page so that when a user clicks on a column heading of a gridview, the data is sorted either in ascending or descending order.

So far, I have done it so that the gridview can be sorted:

<asp:GridView ID="GridView1" runat="server" Height="143px" AllowSorting="true"

I get a message saying:

The GridView 'GridView1' fired event Sorting which wasn't handled.

I dont quite understand what this means.

Can anybody advise please on what this means and what I need to do to overcome this?

Many thanks in advance.


I have just read that I need to create an event handler to handle the sorting of the data.

Would anybody be able to elaborate on this for me at all?



Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.