473,405 Members | 2,154 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,405 software developers and data experts.

Sorting a listitem 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
Nov 22 '05 #1
1 1341
check for the IComparable interface

if you are developing your own classes then inherit 'em from IComperable
or if you're using dataset and/or datatable to bind the data use the
DataView class

I would always prefer IComparable ;)

Murat
"Simon" <sh856531@microsofts_free_email_service.com> wrote in message
news:uG***************@TK2MSFTNGP11.phx.gbl...
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

Nov 22 '05 #2

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

Similar topics

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: Simon | 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...
12
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that...
8
by: D. Roshani | last post by:
Hello Do you have any idea how I can create a Macro in Access which can do costume alphabetic sorting of only one column with foreign words (ISO-8859-1), I would like to define how I want...
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...
2
by: darrel | last post by:
I have an asp:RadioButtonList. If one of the items is selected, I'd like a text field to appear. I tried using an ONCHANGE event via the codebehind, but couldn't get that to work. Plus, I'm...
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...
1
by: l3d007 | last post by:
I used this example straight from msdn in a gridview that already sorts based on each column. For some reason I cannot get it to sort based on two sorting expressions.Is there some property of the...
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: 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
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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.