Absolutely! But since the OP is already binding to a Dataset, he (Alfa-*king*... so I deduced male gender) needs to handle the GridView_sorting event and bind the GridView to a sorted version of the Dataset (easily done by sorting the associated DataView). I would not recommend using a Datasource unless it's an ObjectDatasource.
On Nov 4, 5:51 pm, Paulo Roberto Pellucci <[email protected]> wrote: > Actually you're 100% correct. Per example, if you associate the datasource > with a SqlDataSource object, it will provide you sorting and paging > automatically, right? > > On Wed, Nov 4, 2009 at 10:44 AM, Cerebrus <[email protected]> wrote: > > > Unless I am very mistaken, the GridView itself does not provide > > sorting capabilities. On the contrary, it is very adept at taking > > advantage of the Datasource's sorting/paging capabilities. Setting the > > AllowSorting property will automatically enable sorting only if your > > Datasource also provides this capability. Since you are using a > > Dataset (instead of a Datasource control), you need to provide custom > > sorting logic in the Sorting eventhandler of the GridView. > > -- > Atenciosamente, > Paulo Roberto S. Pellucci
