...
Code Block | ||||
---|---|---|---|---|
| ||||
isc.FilterBuilder.create({ "ID": "advancedFilter", "dataSource": "supplyItem", "topOperator": "and" }); |
The ListGrid also requires additional code to add the FilterBuilder. This will require adding a vertical layout (VStack), together with the grid and the button needed to add for applying the filter on the ListGrid. Also going to add a horizontal layout (HStack) which will contain the two already existing buttons used for saving all data and creating a new record:
Code Block | ||||
---|---|---|---|---|
| ||||
isc.ListGrid.create({ "ID": "supplyItemGridsupplyItem", "width": 700, "height": 224, "alternateRecordStyles": true, "dataSource": supplyItem, "autoFetchData":true, "dataPageSize":20, "canEdit":true, "canRemoveRecords":true, "autoSaveEdits": false }); isc.IButton.create({ "ID": "filterButton", "title": "Filter", "click": function () { supplyItemGridsupplyItem.filterData(advancedFilter.getCriteria()); } }); isc.HStack.create({ "membersMargin": 10, "ID": "gridButtons", "members": [ isc.IButton.create({ "top": 250, "title": "Edit New", "click": "supplyItemGridsupplyItem.startEditingNew()" }), isc.IButton.create({ "top": 250, "left": 100, "title": "Save all", "click": "supplyItemGridsupplyItem.saveAllEdits()" }) ] }); isc.VStack.create({ "membersMargin": 10, "members": [advancedFilter, filterButton, supplyItemGridsupplyItem, gridButtons] }); |
Also note, the filter has been removed top of the grid, as it is being replaced with the FilterBuilder.
...