This is a discussion on The data source 'ObjectDataSource1' does not support sorting with IEnumerable data within the .Net Development forums, part of the Programming & Scripting category; my gridview sort order won't work... and i don't understand the error, what is "IEnumerable data"? Code: The data source ...
| |||||||
|
#1
| ||||
| ||||
| my gridview sort order won't work... and i don't understand the error, what is "IEnumerable data"? Code: The data source 'ObjectDataSource1' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.NotSupportedException: The data source 'ObjectDataSource1' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [NotSupportedException: The data source 'ObjectDataSource1' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.] System.Web.UI.WebControls.ObjectDataSourceView.CreateEnumerableData(Object dataObject, DataSourceSelectArguments arguments) +1337183 System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +2822 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.GridView.OnPreRender(EventArgs e) +24 System.Web.UI.Control.PreRenderRecursiveInternal() +86 System.Web.UI.Control.PreRenderRecursiveInternal() +170 System.Web.UI.Control.PreRenderRecursiveInternal() +170 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041 |
|
#2
| ||||
| ||||
| You're using a ListOf your class so you need to create a custom function for handling sorting in GridView. Here's an example on how to do it: http://www.codeproject.com/useritems...DataSource.asp
__________________ jmurrayhead If you agree with me... click the icon! If my post solved your problem, click the button in the lower right-hand corner of the post.If you like it here...throw us a few bones to help support us. Join our Folding team: DeveloperBarn Folding |
|
#3
| ||||
| ||||
| Quote:
I still can't make heads or tales on this![]() Shem |
|
#4
| ||||
| ||||
| Did you download the VB example? I have implemented the same thing. It's not as difficult as it looks. Just try it out and post any problems you have along the way. |
| The Following User Says Thank You to jmurrayhead For This Useful Post: | ||
Shem (June 25th, 2008) | ||
|
#5
| ||||
| ||||
| another question, can i add more functionality IE links, buttons to the gridview, or is it better to use the repeater control? |
|
#6
| ||||
| ||||
| Quote:
|
![]() |
|
| Bookmarks |
| Tags |
| datasource, gridview, ienumerable, object, sorting |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Retrieving Web Data using Excel | mehere | Microsoft Office | 13 | May 22nd, 2008 03:14 PM |
| Print out data on a letterhead format | Shem | .Net Development | 3 | May 22nd, 2008 09:15 AM |
| Data Type Mismatch in Criteria Expression | alansidman | Microsoft Access | 1 | April 9th, 2008 04:33 PM |
| Concatenation of Column Data function | AOG123 | Access Database Samples | 0 | March 25th, 2008 06:53 AM |
| Concatenation of Column data function.... | Lauramc | SQL Code Samples | 0 | March 17th, 2008 12:32 PM |