Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Grouping rows in gridview, objectdatasource and DALGrouping rows in gridview, objectdatasource and DAL
Previous
 
Next
New Post
5/11/2007 1:02 AM
 
Hi

I'm trying to create a gridview where the rows are grouped together by sort expressions, like the one on this link:

http://aspadvice.com/blogs/joteke/archive/2006/02/11/15130.aspx

However, I'm getting the error:

"The data source "myobjectdatasource" does not support sorting with IEnumerable data. Automatic sorting is only supported with DataView, DataTable, and DataSet"

My controller class has a function which returns a generic List(Of objects). I can't find a method in the DAL which returns a dataset, so how can I convert this List to a DataSet or DataTable so that it will work with the objectdatasource and the gridview, or is there another method I could use to achieve the same end result?

Thanks

Ryan
 
New Post
5/11/2007 8:49 PM
 

If you are using the standard DAL or DAL+ you are converting a Datareader to your Generic List(Of object). You can use a method such as this:

Convert DataReader to Dataset (VB.NET)

and convert the Datareader to a dataset and return that instead of your Generic List(Of object).



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
5/11/2007 10:33 PM
 
Thanks Michael. I added new methods to my code to retreive a dataset instead, and it works now. Looks great.
 
New Post
5/12/2007 9:14 AM
 

Ensonix wrote
Thanks Michael. I added new methods to my code to retreive a dataset instead, and it works now. Looks great.

Thats great :) Are you still using the custom List(Of object) for the Insert, and Update? As you can see in the code on this page. it saves you a ton of code.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
5/15/2007 9:42 AM
 
Yes, I'm using the custom List(Of T) for inserts, updates, and deletes, but this particular gridview is display only, based on a result set pulled from another table joined with the data in the articles table, so i just used a SQLHelper rather than CBO.FillCollection. I can now group my gridview columns by any datacolumn and produce summary rows.

I found your tutorials very useful, and i'm getting the hang of it now using the starter kits. Much easier than under .Net 1.1.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Grouping rows in gridview, objectdatasource and DALGrouping rows in gridview, objectdatasource and DAL


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out