Browser: Firefox 3.6.6
SmartClient version: Isomorphic SmartClient Framework (SC_SNAPSHOT-2010-10-03/EVAL Deployment 2010-10-03)
I'm attempting to use the Filter Editor capabilities of the ListGrid for a Client Only datasource. Everything looks good until you actually try to filter. The result is that all entries go away, regardless of what you attempt to filter by.
The Datasource:
The grid:
Loading the grid:
Thanks.
SmartClient version: Isomorphic SmartClient Framework (SC_SNAPSHOT-2010-10-03/EVAL Deployment 2010-10-03)
I'm attempting to use the Filter Editor capabilities of the ListGrid for a Client Only datasource. Everything looks good until you actually try to filter. The result is that all entries go away, regardless of what you attempt to filter by.
The Datasource:
Code:
public class AvailableActivitiesDS extends DataSource { public AvailableActivitiesDS() { DataSourceIntegerField id = new DataSourceIntegerField("id", "Activity ID"); addField(id); id.setPrimaryKey(true); id.setHidden(true); DataSourceTextField name = new DataSourceTextField("name", "Activity", 125); addField(name); DataSourceTextField description = new DataSourceTextField("description", "Description", 200); addField(description); setClientOnly(true); } }
Code:
myAvailableActivitiesGrid = new ListGrid(); myAvailableActivitiesGrid.setDataSource(getAvailableActivitiesDs()); ListGridField[] fields = myAvailableActivitiesGrid.getFields(); for (ListGridField field: fields) { field.setFilterOperator(OperatorId.ICONTAINS); } myAvailableActivitiesGrid.setAlternateRecordStyles(true); myAvailableActivitiesGrid.setHeight100(); myAvailableActivitiesGrid.setShowResizeBar(false); myAvailableActivitiesGrid.setCanAcceptDroppedRecords(true); myAvailableActivitiesGrid.setCanDragRecordsOut(true); myAvailableActivitiesGrid.setShowFilterEditor(true); myAvailableActivitiesGrid.setDataFetchMode(FetchMode.LOCAL); myAvailableActivitiesGrid.addDropHandler(new DropHandler() { @Override public void onDrop(DropEvent event) { removeActivities(getSelectedActivitiesGrid().getSelection()); } });
Code:
RecordList availableActivityRecords = new RecordList(); for (Record activity: activities) { availableActivityRecords.add(activity); } ResultSet resultSet = new ResultSet(getAvailableActivitiesDs()); resultSet.setAllRows(availableActivityRecords.toArray()); resultSet.setUseClientFiltering(true); myAvailableActivitiesGrid.setData(resultSet);
Comment