Sorting a listitem by a custom field

  • Thread starter Thread starter Simon
  • Start date Start date
S

Simon

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
 
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
 
Back
Top