FetchTypedList with sorting + paging + filtering

Posts   
 
    
Posts: 2
Joined: 10-Mar-2006
# Posted on: 27-Mar-2006 20:49:29   

I am trying to get a typed list to return a datatable which is filtered and sorted for a specific page (for use in an infragistics grid). It appears that the following code ignores the sort and only applies the filtering. Is there something I should be doing differently? bucket is defined as IRelationPredicateBucket and is passed to the following code. Thanks in Advance!

Dim sort As ISortClause Dim bucket as IRelationPredicateBucket Dim myfactory As BusinessObjects2.Roofing.factoryclasses.SortClauseFactory Dim FieldName As String Dim Index As Integer

bucket = GetFiltersFromGrid sort = BusinessObjects2.Roofing.FactoryClasses.SortClauseFactory.Create(LogFieldIndex.AmountOfFields, SortOperator.Ascending)

Dim expr As SortExpression = New SortExpression(sort)

myAdapter.FetchTypedList(myLogList, bucket.PredicateExpression, False, expr, True, pageNum, pageCount)

Rogelio
User
Posts: 221
Joined: 29-Mar-2005
# Posted on: 27-Mar-2006 23:41:34   

BrianMonahan wrote:

sort = BusinessObjects2.Roofing.FactoryClasses.SortClauseFactory.Create(LogFieldIndex.AmountOfFields, SortOperator.Ascending)

Instead of LogFieldIndex.AmountOfFields select the field by which you want the typedlist sorted.