on 10-14-2008 2:23 PM
Hi,
After implementing [table sorter|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3287] [original link is broken] [original link is broken] [original link is broken]; is there any way I can find which column has been clicked for sorting?
Hi,
You will be able to find this from the following method
public void sort(IWDCustomEvent wdEvent, IWDNode dataSource) {
// find the things we need
String columnId = wdEvent.getString("selectedColumn");
String direction = wdEvent.getString("sortDirection");
IWDTableColumn column = (IWDTableColumn) table.getView().getElement(columnId);
NodeElementByAttributeComparator elementComparator = (NodeElementByAttributeComparator) comparatorForColumn.get(column);
if (elementComparator == null){
//not a sortable column
column.setSortState(WDTableColumnSortDirection.NOT_SORTABLE);
return;
}
// sorting
elementComparator.setSortDirection(WDTableColumnSortDirection.valueOf(direction));
dataSource.sortElements(elementComparator);
}
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.