Further, you need to set Sort Expression property of the Bound Fields to the name of the column on which you would like to sort the grid.
Once you set these properties you will find that the column headers of all the columns for which you specified Sort Expression property appear as clickable link buttons.
There are many articles and tutorials around that illustrate the use of Grid View control along with the new Data Source Controls.The Sorting event handler receives an event argument of type Grid View Sort Event Args.The Grid View Sort Event Args class has three important properties.The Data View supplies all the records from the Employees table.In order to implement paging you need to set Allow Paging property of the Grid View control to True. There are two events of Grid View that are related to paging.The Bind Grid() method is our own function that we will create later on.The method essentially binds the Grid View with a Data View.Thanks for choosing Dev Express for your software development needs.We are your extended team and are working hard to make certain you have all the resources necessary to build your next great app.We need to access this variable from Bind Grid() method so that our sorting will work correctly under all the circumstances. The following figure shows the Grid View after implementing sorting.Similarly we set a View State variable called sortdirection. In order to edit records displayed in the Grid View, we need to add a Command Field to the Grid View.