470,586 Members | 1,636 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,586 developers. It's quick & easy.

Sorting on GridView

Hi,

I am using gridview in my form and binded the gridview with object datasource.I am trying to implement sorting for my grid view and i am getting following error.i am using asp.net with VB


Server Error in '/' Application.
--------------------------------------------------------------------------------

The data source 'objdsDataSource' 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 'objdsDataSource' does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet.



Can any one please help me how to solve this Problem

Thanks
Feb 23 '08 #1
2 1137
kenobewan
4,871 Expert 4TB
Looks like you are using the wrong datasource in your code. HTH.
Feb 23 '08 #2
I would suggest sorting the DataSet or DataTable before setting it as the DataSource.

Personally, I try and do any sorting as close as possible to the data. So if it is from a database, I would generally sort in the Stored Procedure, and so I avoid having to deal with this problem.

HTH. If you are still having a problem, please post some code.

Good luck
Feb 24 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by samb | last post: by
4 posts views Thread by kurt sune | last post: by
reply views Thread by jobo | last post: by
2 posts views Thread by sivagururaja | last post: by
4 posts views Thread by =?Utf-8?B?R2VyaGFyZA==?= | last post: by
3 posts views Thread by =?Utf-8?B?YmJkb2J1ZGR5?= | last post: by
reply views Thread by =?Utf-8?B?QVZM?= | last post: by
1 post views Thread by dorandoran | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.