473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Sorting a datalist

Hi,

I am working with a DataList and am binding objects to it. I normally use
IList or other collections that implement the IEnumerable interface. I have
a datalist that I need to be able to sort on every column. Does anyone have
any ideas on the best way to sort a DataList?

Thanks in advance.
Nov 18 '05 #1
2 1346
Use a sorted DataView for the data that the datalist is bound to and re-bind
the DataList to the DataView.
"Dufus" <fi**@dich.de> wrote in message news:co**********@online.de...
Hi,

I am working with a DataList and am binding objects to it. I normally use
IList or other collections that implement the IEnumerable interface. I
have a datalist that I need to be able to sort on every column. Does
anyone have any ideas on the best way to sort a DataList?

Thanks in advance.

Nov 18 '05 #2

"Scott M." <s-***@nospam.nospam> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl...
Use a sorted DataView for the data that the datalist is bound to and
re-bind the DataList to the DataView.

Yep, that works nicely. Thanks.

I also found a good article at: http://aspalliance.com/154
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: LRW | last post by:
Is it possible? Here's the opening block of my datalist in the ASPX page, and I was wondering if there's a way to sort the output by a particular field: <asp:datalist ID="dgProducts"...
0
by: Eph0nk | last post by:
Hi, I have two small questions concerning databounding an xml file to a datalist. 1. Can i do (ascending/descending) sorting on a certain field? 2. Is it possible to show onliy the first 5...
0
by: Paul Turley | last post by:
I have a DataList control bound to a DataSet containing two tables. How do I sort the parent table without losing my relation? If I bind the DataList to a DataView, it's no longer relational...
1
by: Haydn Williams | last post by:
Hi, I have a load of records in a datalist, where RepeatColumns=3. The records are sorted by a particular field, and the sort order runs down the first column, then jumps to the top of the second...
6
by: Paul | last post by:
I am trying to use a DataList and the ItemTemplate. I am binding the Datalist to a SQL query that gives me a list of Items with a Parent Category. I want to loop through all the items, but...
3
by: Brian Barnes | last post by:
Hi, I know this has been done quite often before, but all my research and trials have not worked. Basically I am trying to display a sorted list of e-mail Addresses in a datalist control (using...
0
by: LisaBigJax | last post by:
I'm using VWD2.0 and VB I'm working with a Datalist (which doesn't have built-in sorting like the Gridview) and I would like to sort the datalist via dropdown list. In the...
3
by: Mirek Endys | last post by:
I have DataList as part of DataList item. DataList in DataList. The parent DataList working well including Edit command, that shows Edit template and correctly bind the data into edit template...
0
by: Maran | last post by:
We have come across a situation that I thinks not many have. Grateful for all responses. Regards Maran ************* * Scenario A DataList binds to a DataRow, with "RegionName" och...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.