Hi ,
In below code default sorting is not working on UI interface.
a!gridTextColumn( label: "Served By", field: "servedBy", data: a!applyComponents( function: rule!getUserName(_), array: ri!subset.data.servedBy ) )
In this we are setting local.paginInfo in load and passing same on ein with() to this dataset subset. Then further this dataset i am passing to another rule where i am keeping grid section.
After clicking on header column sorting should be work but its not working. Tried lot but not found feasible solution.
Discussion posts and replies are publicly visible
Please see the second half which I just added to my previous reply - basically I'm concerned with you trying to save into local!gridSelection when it's defined in the parent interface and not passed down via a Rule Input.
For your reference here's a simple, one-interface pre-19.2 paging grid that I just wrote from scratch, and handles your use case perfectly as far as I can tell, including sorting on the one column I added as well as paging, plus preventing the user from selecting more than one item.
load( local!gridselection: a!gridselection( pagingInfo: a!pagingInfo(1,10), selected: {} ), with( local!dataSubset: rule!MyQuery( pagingInfo: local!gridselection.pagingInfo ), a!gridField( label: "TEST", totalCount: local!dataSubset.totalCount, selection: true(), identifiers: local!dataSubset.data.Id, value: local!gridselection, saveInto: { a!save( local!gridselection, a!gridSelection( pagingInfo: save!value.pagingInfo, selected: if( count(save!value.selected) > 2, local!gridselection.selected, index( save!value.selected, count(save!value.selected), {} ) ) ) ) }, columns: { a!gridtextcolumn( data: local!dataSubset.data.Id, field: "Id" ) } ) ) )
Sorry no impact after changing code with ri!gridSelection also.
Its ok Mike you have given a lot of solution but issue could be something else . But thanks for your time .
Please have a look on this reply which I got on different thread for same issue, I don't know but I feel that could be the reason of this issue or by that we can solve this.
https://community.appian.com/discussions/f/user-interface/17103/a-gridfield-sorting-issue)