I just can't seem to get collection sorting down. help from anyone would be greatly appriciated.
The following returns with the PageTemplates correctly sorted by startdate
Dim MasterTemplateMap As CMS.EntityClasses.MasterTemplateMapEntity
Dim sorter As ISortExpression = New SortExpression(CMS.FactoryClasses.SortClauseFactory.Create(CMS.MasterTemplateFieldIndex.StartDate, SortOperator.Descending))
MasterTemplateMap = New CMS.EntityClasses.MasterTemplateMapEntity(1)
MasterTemplateMap.SetCollectionParametersMasterTemplate(10, sorter)
However why does the following not return with the correct sorting. I'm trying to access the MasterTemplateMap's MasterTemplate collection from it's parent 'PageMap'
Dim sorter As ISortExpression = New SortExpression(CMS.FactoryClasses.SortClauseFactory.Create(CMS.MasterTemplateFieldIndex.StartDate, SortOperator.Descending))
Dim PageMap As New CMS.EntityClasses.PageMapEntity
PageMap.MasterTemplateMap.SetCollectionParametersMasterTemplate(0, sorter)
PageMap.FetchUsingPK(1)
Thanks