We're using SmartGWTPro 4.1.
We have a ListGrid with filtering enabled:
issueListGrid.setShowFilterEditor(true);
For every new load of data we wan't to update the filter option valueMaps - but the values entered the first time around are persistent and NEVER updated.
Here's the core of the update function following each load (trivial stuff not included):
We've tried different versions of putting in
which was mentioned in another post as re-initializing the filterEditor, but to no awail.
We have a ListGrid with filtering enabled:
issueListGrid.setShowFilterEditor(true);
For every new load of data we wan't to update the filter option valueMaps - but the values entered the first time around are persistent and NEVER updated.
Here's the core of the update function following each load (trivial stuff not included):
Code:
void updateGrid(List<T> listOfIssues) {
dataSource = new DataSource();
dataSource.setClientOnly(true);
faultMap.clear();
IssueListRecord[] issues = new IssueListRecord[listOfIssues.size()];
for (Issue issue : listOfIssues) {
//faultMap & issues are populated here
}
DataSourceTextField dsFaultField = new DataSourceTextField("fault","Fault");
dsFaultField.setCanEdit(false);
dsFaultField.setCanFilter(true);
dsFaultField.setValueMap(faultMap); //should update filter options for this field
...other fields
dataSource.setFields(..., dsFaultField ,...);
for (IssueListRecord issueListRecord : issues) {
dataSource.addData(issueListRecord);
}
issueListGrid.setDataSource(dataSource, issueListGrid.getAllFields());
...updating currentCriteria according too prior selections
issueListGrid.fetchData(currentCriteria);
}
Code:
issueListGrid.setShowFilterEditor(false); issueListGrid.setShowFilterEditor(true);
Comment