Hello
Not a totally stupid question this one I hope. At the bottom of the post is a loop that I have written - it is going to populate a number of different list boxes for each ProductTypeID with it's child values (ProductTypeOptions).
This works fine, however my child objects (producttype.ProductTypeOptions) are coming back in the order they were entered into the database - I want to bring them back ordered by the field "OrderID"
I am presuming that I am going to have to change my first line to add the sort in... but how would I go about doing that?
Many thanks
Darren
ProductTypeEntity producttype = new ProductTypeEntity(m_oProduct.ProductTypeId);
for (Int32 i = 0; i < producttype.ProductTypeOptions.Count; i++)
{
// Do something here
for (Int32 j = 0; j < producttype.ProductTypeOptions[i].ProductTypeOptionAttributes.Count; j++)
{
// Do something here
}
// Do something here
}