I need to show a dropdown list of distinct column values in a filter box of a ListGrid.
My code is based on the Live Filter example. In this example the dropdown for continent list is populated in datasource via
continentField.setValueMap("Europe", "Asia",...);
To have this data dynamically sourced from the database, I am using SelectItem with OptionDataSource:
ListGridField f = new ListGridField(def.name, def.title);
SelectItem si = new SelectItem(def.name, def.title);
si.setOptionDataSource(optionDs);
f.setFilterEditorType(si);
The option datasource fetch is executed once and populates the dropdown list in the filter.
How can I force the datasource to do fetch every time the data in the grid has changed?
Thank you
My code is based on the Live Filter example. In this example the dropdown for continent list is populated in datasource via
continentField.setValueMap("Europe", "Asia",...);
To have this data dynamically sourced from the database, I am using SelectItem with OptionDataSource:
ListGridField f = new ListGridField(def.name, def.title);
SelectItem si = new SelectItem(def.name, def.title);
si.setOptionDataSource(optionDs);
f.setFilterEditorType(si);
The option datasource fetch is executed once and populates the dropdown list in the filter.
How can I force the datasource to do fetch every time the data in the grid has changed?
Thank you
Comment