Reset user column sort option on dynamic grid
Hi,
I have a grid with no auto-populate and I used the rowset select peoplecode method to populate the grid based on user criteria. example:
&rs = GetLevel0()(1).GetRowset(Scroll.ABCD_VW);
&rs.flush();
&rs.Select(Record.ABCD_VW, "WHERE deptid =:1",&deptid)
I have the above code on a button on fieldchange event. It is working perfectly without any issues, however, when the user clicks the delivered column sort option on the grid, example sort by first name by clicking the column, then the grid is sorted as expected. Now when user enters another deptid and press the button to view that dept on grid then cursor goes to end of the grid. Example, if grid has 20 rows it displays row 16-20 instead of 1-10 as I had set previously. This seems to happen only when user sorts the grid by