, gridview, fired event error

CoolDev2014 used Ask the Experts™
The GridView fired event Sorting which wasn't handled.

I got above error message in gridview. No wonder why and how to fix....
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Sr.Software Engineer
Top Expert 2013
i think you are trying to sorting your gridview and you have not handled the sorting event in the code behind as below.

protected void GridView1_Sorting(object sender, GridViewSortEventArgs e)

When you are manually doing the data binding, you have to handle all the events around it
For sorting, you should have a handler for GridView's Sorting event.

just check for properties of gridview in visual studio and select the event tab and select sorting, double click in the box and it will be automatically generated in code behind

hope this helps.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial