I have a celltable in GWT and want to implement sorting functionality on it , from database(Criteria) for that i just want to know how to get the value of the column which has been clicked for sorting
here is my code
ctJobs.addColumnSortHandler(new ColumnSortEvent.Handler() {
public void onColumnSort(ColumnSortEvent event) {
event.getColumn();
event.getColumn().getValue("what do we need to write here ???");
from event.getColumn() , i am getting column in the form of object
com.google.gwt.cell.client.ClickableTextCell@188a12e
I want to know the the column's name / value for that i am trying event.getcolumn().getvalue("??"); but what is the parameter for that, or is there any other way of getting column's name which has been clicked.
Thanks
Are you using a
ListDataProvider
or anAsyncDataProvider
for your cell table?In case of an
AsyncDataProvider
the sorting must be done on the server side, so there is no need to add aColumnSortHandler
.Please see the GWT docs.
To get the name of the column clicked for sorting see this question.