Hi all, I just have curiosity about something that I read in a book " Unlike using the DataGrid, where you are responsible for
coding the sort routine, to enable column sorting in this grid, you just set the AllowSorting attribute to
True. The control takes care of all the sorting logic for you internally
and i want to make sure that work for somebody here, because i did try it and told me that the sort procedure is missing, which mean still i have to write some codes to handle the sort feature. anyway i just want to know if that is possible of course i would like to try it.

thanks all. regards.

8 Years
Discussion Span
Last Post by jbisono

The automatic sorting feature will work only if you bind the GridView with DataSource controls like SqlDataSource and ObjectDataSource. These controls automatically take care binding data with GridView. Therefore the sorting feature also handled automatically by them.

If you bind the GridView with a DataSet , then you need to call DataBind() explicitly method to bind the data source . Therefore you need to write the code to provide sorting feature.

Edited by Ramesh S: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.