Version: v11.0p_2017-05-26/PowerEdition Deployment (built 2017-05-26)
I have a listgrid in which a column is of type multiselect. Now i want to show a filter such that a dropdown with values is displayed. Whenever user selects, any value(s), all the records which contain any of the values in filter should be displayed.
How can i achieve this. I have written below code till now
public static void setFilterForAttrValues(IListGridField attrField) {
SelectItem filterSelectItem = new SelectItem();
final DataSource materialAttrDataSource = DataSource.get(ClientConstants.MATERIAL_ATTR_DS);
filterSelectItem.setDisplayField(MATERIAL_ATTR_DS_PRINT_CODE);
filterSelectItem.setValueField(MATERIAL_ATTR_DS_PRINT_CODE);
filterSelectItem.setOptionDataSource(materialAttrDataSource);
filterSelectItem.setMultiple(true);
filterSelectItem.setAutoFetchData(true);
attrField.setFilterEditorProperties(filterSelectItem);
}
But this is not working properly. If i enter A in filter and a records contains A,B it is not displayed. But records containing only A are displayed.
Please help.
I have a listgrid in which a column is of type multiselect. Now i want to show a filter such that a dropdown with values is displayed. Whenever user selects, any value(s), all the records which contain any of the values in filter should be displayed.
How can i achieve this. I have written below code till now
public static void setFilterForAttrValues(IListGridField attrField) {
SelectItem filterSelectItem = new SelectItem();
final DataSource materialAttrDataSource = DataSource.get(ClientConstants.MATERIAL_ATTR_DS);
filterSelectItem.setDisplayField(MATERIAL_ATTR_DS_PRINT_CODE);
filterSelectItem.setValueField(MATERIAL_ATTR_DS_PRINT_CODE);
filterSelectItem.setOptionDataSource(materialAttrDataSource);
filterSelectItem.setMultiple(true);
filterSelectItem.setAutoFetchData(true);
attrField.setFilterEditorProperties(filterSelectItem);
}
But this is not working properly. If i enter A in filter and a records contains A,B it is not displayed. But records containing only A are displayed.
Please help.
Comment