Hi,
How does one sort a collection after the call to Getmulti.
We get a collection from the database. Then we add a bunch of new entities to the collection, and we want to re-sort the collection. We tried adding a SortExpression and ApplySort but could not get it to work. We also did not find anything in the documentation about sorting after the GetMulti.
The Code:
Dim oSort As ISortExpression = New SortExpression(SortClauseFactory.Create(UDB.OfferStepFieldIndex.CampaignStepID, SortOperator.Ascending))
oOfferStepCollection.SortClauses = oSort
oOfferStepCollection.ApplySort(oOfferStepCollection.SortProperty, ComponentModel.ListSortDirection.Ascending)
and also....
oOfferStepCollection.SortClauses.Add(oSort)
and also
oOfferStepCollection.SortClauses.Insert(0, oSort)
Thanks