1. SmartClient Version: v9.1p_2014-04-29/Pro Deployment (built 2014-04-29)
2. FF ESR 24.5.0
3. N/A
4. N/A
5. N/A
6.
It would appear that every time listGrid.setData (see code snippet below) is called, a SortEvent fires and onSortChanged(SortEvent) is called on my SortChangedHandler. Any suggestion for how I can react only to Sort Changed events driven manually by the user (i.e. context-menu Sort Ascending, Sort Descending, Configure Sort, Clear Sort, etc.). I found the SorterClickHandler, but that only captures clicks on the corner sorter. Or is there something I can do to prevent a SortEvent from firing when calling listGrid.setData in this case?
listGrid.getDataSource().fetchData(criteria, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData, DSRequest request) {
DataSource dataSource = listGrid.getDataSource();
ResultSet resultSet = new ResultSet(dataSource);
resultSet.setInitialLength(response.getTotalRows());
resultSet.setInitialData(response.getData());
resultSet.setInitialSort(listGrid.getSort());
resultSet.setCriteria(listGrid.getCriteria());
listGrid.setData(resultSet);
}
}, request);
Thanks
2. FF ESR 24.5.0
3. N/A
4. N/A
5. N/A
6.
It would appear that every time listGrid.setData (see code snippet below) is called, a SortEvent fires and onSortChanged(SortEvent) is called on my SortChangedHandler. Any suggestion for how I can react only to Sort Changed events driven manually by the user (i.e. context-menu Sort Ascending, Sort Descending, Configure Sort, Clear Sort, etc.). I found the SorterClickHandler, but that only captures clicks on the corner sorter. Or is there something I can do to prevent a SortEvent from firing when calling listGrid.setData in this case?
listGrid.getDataSource().fetchData(criteria, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData, DSRequest request) {
DataSource dataSource = listGrid.getDataSource();
ResultSet resultSet = new ResultSet(dataSource);
resultSet.setInitialLength(response.getTotalRows());
resultSet.setInitialData(response.getData());
resultSet.setInitialSort(listGrid.getSort());
resultSet.setCriteria(listGrid.getCriteria());
listGrid.setData(resultSet);
}
}, request);
Thanks
Comment