Hi Isomorphic,
please see this modified sample (v12.1p_2024-06-02, but also 13.0p).
Blama
please see this modified sample (v12.1p_2024-06-02, but also 13.0p).
- Start sample (starts with implicitCriteria from 1st button)
- Switching data with the 2nd and 1st button always results in a data reload (expected)
- Show the filter row
- Filter Government for "commonwealth" in the dropdown, filter for it
- Switching data with the 2nd and 1st button always results in a reload when switching 2nd->1st (expected)
- Switching data with the 2nd and 1st button requires a 2nd click on the 2nd button when switching 1st->2nd (unexpected)
Blama
Code:
isc.ListGrid.create({ ID: "filterGrid", width: 850, height: 500, alternateRecordStyles: true, dataSource: worldDS, autoFetchData: true, groupByField: "continent", groupStartOpen: "all", sortField: "continent", groupByMaxRecords: 80, sortByGroupFirst: "true", implicitCriteria: { _constructor: "AdvancedCriteria", operator: "and", criteria: [{ fieldName: "continent", operator: "inSet", value: ["Africa", "Asia", "Australia/Oceania", "Europe", "North America", "South America"] }] }, fields: [{ name: "countryCode", width: 60 }, { name: "government", filterEditorProperties:{type:"SelectItem", sortField:"government", multiple:true}, }, { name: "continent", }, { name: "capital", }, { name: "independence", width: 100 }, { name: "population", width: 100 }, { name: "gdp", width: 85 }] }); // Implicit criteria Buttons isc.IButton.create({ ID: "europeAsiaBtn", width: 250, title: "inSet: AF/AS/AU/EU/NA/SA (=all)", click: function() { filterGrid.setImplicitCriteria({ _constructor: "AdvancedCriteria", operator: "and", criteria: [{ fieldName: "continent", operator: "inSet", value: ["Africa", "Asia", "Australia/Oceania", "Europe", "North America", "South America"] }] }); } }); isc.IButton.create({ ID: "europeAsiaAusBtn", width: 250, title: "inSet: AS/AU/EU/NA/SA", click: function() { filterGrid.setImplicitCriteria({ _constructor: "AdvancedCriteria", operator: "and", criteria: [{ fieldName: "continent", operator: "inSet", value: ["Asia", "Australia/Oceania", "Europe", "North America", "South America"] }] }); } }); isc.IButton.create({ ID: "allCtnBtn", width: 250, title: "All continents (null criteria)", click: function() { filterGrid.setImplicitCriteria(null); } }); isc.HStack.create({ ID: "criteriaBtnStack", membersMargin: 30, height: 1, members: [ isc.Label.create({ contents: "Implicit Criteria:", height: 1 }), europeAsiaBtn, europeAsiaAusBtn, allCtnBtn ] }); // Filter criteria Buttons isc.IButton.create({ ID: "showFilterRowBtn", width: 250, title: "Show filterRow", click: function() { filterGrid.setShowFilterEditor(true); } }); isc.IButton.create({ ID: "hideFilterRowBtn", width: 250, title: "Hide filterRow", click: function() { filterGrid.setShowFilterEditor(false); } }); isc.HStack.create({ ID: "filterBtnStack", height: 1, membersMargin: 30, members: [ isc.Label.create({ contents: "Filter:", height: 1 }), showFilterRowBtn, hideFilterRowBtn ] }); isc.VStack.create({ membersMargin: 30, members: [ criteriaBtnStack, filterBtnStack, filterGrid ] });
Comment