473,386 Members | 1,694 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,386 software developers and data experts.

Sorting a listitemcollection by a custom field

Hi everyone,

I need to sort a list item collection by a sort order value taken from a
database.

The first thing that occured to me was that I could inherit from ListItem
and add a sortOrder field to it. Unfortunately this isnt working because
listitem is sealed.

Does anyone know another way to sort the listitem by an int?

Thank all

Simon
Jul 21 '05 #1
0 2240

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

Similar topics

6
by: Kurt Mang | last post by:
Hi all -- I hate to yell "BUG", but can anyone explain why I cannot get a dropdown list / checkboxlist to recognise the Value property of a ListItemCollection (created at runtime) that I bind...
0
by: RAMADU | last post by:
Hi There is a ListItemCollection containing ListItems (of course), each of whose Value and Text properties have been set. The Value and Text's values are different i.e. ListItem.Text = "Name0"...
2
by: RAMADU | last post by:
Hi There is a ListItemCollection containing ListItems (of course), each of whose Value and Text properties have been set. The Value and Text's values are different i.e. ListItem.Text = "Name0"...
1
by: Jeremy | last post by:
I want my gird to sort only the items on the current page when I click on a column header. I wrote a little test app, but when I sort it pulls in items from other pages and places them on the current...
7
by: 00_ChInkPoIntD12 | last post by:
Can anyone confirm there isn't a Sort() method for WebControl Listbox in Asp.net? It is rather simple to write a method to do the sorting, but just wondering I shouldn't invent the wheel if...
0
by: Simon Harvey | last post by:
Hi everyone, I need to sort a list item collection by a sort order value taken from a database. The first thing that occured to me was that I could inherit from ListItem and add a sortOrder...
1
by: RichardH | last post by:
Hi, I have a ListItemCollection that I bind to DropDownList: ListItemCollection items = new ListItemCollection(); ListItem item; item = new ListItem("Option 1", "1"); items.Add(item); item =...
4
by: Ambica Jain | last post by:
Hi, I want custom sorting on some of the columns in the datagrid. And i am able to do the same by overriding MouseDown event. However, i need to rebind my datatable to reflect the changes in...
2
by: Bob Laubla | last post by:
Hello I have a very complex maketable query with many records and involving multiple VB functions which call other functions. I need this table to be sorted by the first field. But no matter what...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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,...

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.