Last post Jun 18, 2013 07:59 AM by mlh2
Feb 03, 2006 12:32 PM|chadgei|LINK
Feb 21, 2006 11:13 AM|wedwardbeck|LINK
I'm researching the same problem. If you are using Ilists (hence IEnumerable) it does not support sorting. See this article here
There are ways around as shown there, but it's not as easy as using a DataSet (from what I can find). A default GridView (2.0) binding to an ODS using DataSet will allow sorting in the GV. Using ILists/IEnumerable (like my ODS in the DotNetNuke framework
for Data access) will not support this.
If anyone has some better links or examples, I'm sure this will become a popular item. It seemed popular for .Net 1.x DataGrids a while ago. That changed in 2.0 with the GV for SQL Data Sources, and ironically I'm struggling with this again by using the
Oct 28, 2007 02:34 AM|pranata|LINK
Just set the following in your Page_Load event:
That should assign your sort expression to the objectdatasource's sort parameter the first time the page loads.
The Selecting event of the objectdatasource fires twice for 1) the SelectMethod and 2) the SelectCountMethod.
Hope that helps.
Jun 18, 2013 07:59 AM|mlh2|LINK
That solved my issue, Thanks !