I have a grid with two columns, showing the values of only one, shared data source field. Filtering the grid is not working as expected.
If I enter a value into the filter of the first column the focus gets lost after I type one character.
If I enter a value into the filter of the second column the filter works better - but as soon as you switch the order of the columns by using drag and drop strange filter behaviour occurs.
Is there any workaround for this problem?
Thanks in advance!
1. Versions:
my SmartGWT version: 5.0p.0.0 09/14/2014 13:46 +0000 LGPL
my SmartClient version: v10.0p_2014-09-14
2. browser(s) and version(s) involved:
Firefox 31 on Windows 7 Professional
3. source code:
If I enter a value into the filter of the first column the focus gets lost after I type one character.
If I enter a value into the filter of the second column the filter works better - but as soon as you switch the order of the columns by using drag and drop strange filter behaviour occurs.
Is there any workaround for this problem?
Thanks in advance!
1. Versions:
my SmartGWT version: 5.0p.0.0 09/14/2014 13:46 +0000 LGPL
my SmartClient version: v10.0p_2014-09-14
2. browser(s) and version(s) involved:
Firefox 31 on Windows 7 Professional
3. source code:
Code:
public class Main7 implements EntryPoint { private VLayout layout = new VLayout(20) {{ setHeight(400); setWidth(400); }}; @Override public void onModuleLoad() { createConstellation( true, true, "The filter in the first column is not working:"); createConstellation( true, false, "The filter is not working:"); createConstellation(false, true, "The filter is working:"); layout.show(); } public void createConstellation(boolean filterable1, boolean filterable2, String title) { Label titleLabel = new Label(title); titleLabel.setHeight(20); layout.addMember(titleLabel); DataSourceField dataSourceField = new DataSourceField("value", FieldType.INTEGER); Record record = new Record(); record.setAttribute(dataSourceField.getName(), 17); DataSource dataSource = new DataSource(); dataSource.setFields(dataSourceField); dataSource.setClientOnly(true); dataSource.setCacheData(record); ListGridField listGridField = new ListGridField("value1", "value1 " + (filterable1 ? "filterable" : "")); listGridField.setDataPath(dataSourceField.getName()); listGridField.setCanFilter(filterable1); ListGridField listGridField2 = new ListGridField("value2", "value2 " + (filterable2 ? "filterable" : "")); listGridField2.setDataPath(dataSourceField.getName()); listGridField2.setCanFilter(filterable2); ListGrid listGrid = new ListGrid(); listGrid.setFields(listGridField, listGridField2); listGrid.setDataSource(dataSource); listGrid.setAutoFetchData(true); listGrid.setShowFilterEditor(true); listGrid.setFilterOnKeypress(true); layout.addMember(listGrid); } }
Comment