Hi, im trying to figure out sort the collection from a LLBLGenProDataSource which is placed in the .aspx and has LivePersistence set to false and SortingMode set to client side:
<llblgenpro:LLBLGenProDataSource ID="LLBLGenProDataSource1" runat="server" DataContainerType="EntityCollection"
EntityCollectionTypeName="oeg_intranet.CollectionClasses.CompaniesCollection, oeg_intranet" SortingMode="ClientSide" LivePersistence="False">
</llblgenpro:LLBLGenProDataSource>
in the code behind i have the PerformSelect:
Protected Sub LLBLGenProDataSourceCompanies_PerformSelect(ByVal sender As Object, ByVal e As SD.LLBLGen.Pro.ORMSupportClasses.PerformSelectEventArgs) Handles LLBLGenProDataSource1.PerformSelect
'Sort
Dim sortExpression As New SortExpression
sortExpression.Add(New SortClause(CompaniesFields.CompanyName, SortOperator.Ascending))
e.ContainedCollection.GetMulti(e.Filter, -1, sortExpression, e.Relations, e.PrefetchPath)
End Sub
This works fine, but i want to also be able to set the sorting to a "Fields on related fields" field which i created in LLBLGen but it doesn't appear as a field of "CompaniesFields". What's the best way to do this and is there a simpler way of doing this?
I want to be able to pass the sortby field name in via the querystring and then set the sort expression from this.
Thanks in advance.
Dan.