Hi,
If a field is marked as canFilter=false then it is not possible to create an advanced hilite rule on it.
To reproduce go to showcase example http://www.smartclient.com/#dataDrivenHilites and change countryDSHilites as follows:
population field is marked as not search able.
Also change dataDrivenHilites.js as follows:
Added:
showFilterEditor: true,
canEditHilites: true,
Try it now and define hilite rule on population field:

This is working perfectly:

But if you try to add an advanced rule:

then you are not able to enter any value into the criteria.
It seems to me that hilite advanced rule is using common criteria editor which is not aware of the fact that it is fine to enter criteria for non searchable field while defining hilite rule.
Thanks
MichalG
If a field is marked as canFilter=false then it is not possible to create an advanced hilite rule on it.
To reproduce go to showcase example http://www.smartclient.com/#dataDrivenHilites and change countryDSHilites as follows:
Code:
isc.DataSource.create({ ID: "countryDSHilites", fields:[ { name: "countryName", title:"Country" }, { name: "countryCode", title:"Code" }, { name: "independence", title:"Independence", type:"date" }, { name: "population", title:"Population", type:"integer", canFilter: false }, { name: "gdp", title:"GDP ($M)", type:"float" }, { name: "area", title:"Area (km²)", type: "float" }, { name: "population", type: "integer", title: "Population" }, { name: "capital", type: "text", title: "Capital" }, { name: "government", type: "text", title: "Government", length: 500 } ], clientOnly: true, testData: countryDataHilites });
Also change dataDrivenHilites.js as follows:
Code:
var ds = isc.DataSource.get("countryDSHilites"); isc.VLayout.create({ ID:"layout", width:500, height:250 }); // Function to create a new ListGrid. function recreateListGrid() { layout.addMember(isc.ListGrid.create({ ID: "countryList", width:"100%", height:"*", alternateRecordStyles:true, dataSource: ds, autoFetchData: true, canAddFormulaFields: true, canAddSummaryFields: true, showFilterEditor: true, canEditHilites: true, fields:[ {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png" }, {name:"countryName", title:"Country"}, {name:"capital", title:"Capital"}, {name:"population", title:"Population", format:",0"}, {name:"area", title:"Area (km²)", format:",0"}, {name:"gdp", format:",0"} ], hilites: [ { fieldName: "area", textColor: "#FF0000", cssText: "color:#FF0000;", id: 0 }, { fieldName:[ "area" , "gdp" ], textColor: "#FFFFFF", backgroundColor: "#639966", cssText: "color:#3333FF;background-color:#639966;", id:1 } ] })); } // Create the initial ListGrid. recreateListGrid();
showFilterEditor: true,
canEditHilites: true,
Try it now and define hilite rule on population field:
This is working perfectly:
But if you try to add an advanced rule:
then you are not able to enter any value into the criteria.
It seems to me that hilite advanced rule is using common criteria editor which is not aware of the fact that it is fine to enter criteria for non searchable field while defining hilite rule.
Thanks
MichalG
Comment