I am using gwt celltable.
My columns are configurable through other module. used AsyncDataProvider to update row data.
Is there any way in celltable to updateColumnData only? so that newly added data get inserted into celltable or to remove column from celltable.
Assume, 10 column in table. User can configure celltable column
- user want to remove 2 selected column then server call is made and related recordList object along with columninfo (8 columns) is coming, but in this case old 10 columns with data and 8 column without data is populated into celltable
Actual: 18 columns displaying in celltable, 10 column with data + 8 column without data
Expected: 8 column with record
Sample code is as follows
asyncDataProvider.updateRowData(startRowIndexOfPage, result);
if ("CONFIGURE".equals(eventType)) {
cellTable.redraw();
// To create column
createCellTableColumns(latestColumnList);
}
cellTable.redraw();
result : record list with record information latestColumnList : List : Updated number of column with column information
I want to show only new data(column+record data) in celltable which comes from server
Edit Tried to create new celltable with new column data in following way but not useful new column not added/removeed old celltable is as it is.
if ("CONFIGURE".equals(eventType) ) {
asyncDataProvider.removeDataDisplay(cellTable); // remove old celltable
cellTable = createNewCellTable(); // after column config create new celltable
pager.setDisplay(cellTable);
pager.setSearchRecordCount(searchRecordCount);
asyncDataProvider.updateRowData(startRowIndexOfPage, result);
createCellTableColumns(latestColumnList());
asyncDataProvider.addDataDisplay(cellTable);
}
How to do this?