SmartClient_SNAPSHOT_v90d_2013-06-09
The reference for ListGridField.canHilite reads as follows:
"Determines whether this field can be hilited. Set to false to prevent this field from appearing in HiliteEditor."
This property is marked IRW.
If I set this property after creating the grid, as in the test case below, and open the Hilites editor, the field still shows up.
However, if I set this on the data source field, then it does not appear in the Hilites editor.
Is the reference incorrect, or should I be able to set canHilite after grid initialization? Setting it before grid initialization works as expected, and I can use the workaround, I just wanted to point this one out. For comparison purposes, I use ListGridField.canGroupBy=false after grid initialization to not display fields in the configure grouping menu and this works correctly.
The reference for ListGridField.canHilite reads as follows:
"Determines whether this field can be hilited. Set to false to prevent this field from appearing in HiliteEditor."
This property is marked IRW.
If I set this property after creating the grid, as in the test case below, and open the Hilites editor, the field still shows up.
Code:
gridObject.getField("static").canHilite=false;
gridObject.editHilities();
Code:
ds.getField("static").canHilite=false;
gridObject.editHilities();
Code:
<!DOCTYPE html>
<html>
<head>
<title >SNTQ-1253</title>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Core.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Foundation.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Containers.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Grids.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Forms.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_DataBinding.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Drawing.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_PluginBridges.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Charts.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/system/development/ISC_Tools.js"></script>
<script type="text/javascript" SRC="http://localhost:8080/isomorphic/skins/EnterpriseBlue/load_skin.js"></script>
<script type="text/javascript" >
var isomorphicDir="http://localhost:8080/isomorphic/";
var data = [
{inspectorID:12345, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:206,observations:913,lastInspectionDate:new Date(2012, 8, 13),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:67890, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:66,observations:0,lastInspectionDate:new Date(2013, 2,2),index:75.3, inspectionType: {id:123, name:"type1"}},
{inspectorID:88776, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:66,observations:67,lastInspectionDate:new Date(2013,2,3),index:75.3, inspectionType: {id:123, name:"type1"}},
{inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:206,observations:0,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}},
{inspectorID:44556, region:"United States", state:"Pennsylvania", city:"Pittsburgh", inspections:206,observations:0,lastInspectionDate:new Date(2012,8,31),index:52.6, inspectionType: {id:123, name:"type1"}}
];
</script>
</head>
<body>
<script>
isc.DataSource.create({
ID: "ds",
fields: [
{name:"inspectorID", title:"Inspector ID", type:"integer" },
{name:"inspections", type:"integer", title:"Number of Inspections"},
{name:"static", type:"text", title:"Really Long Static Field Title"},
{name:"region", type:"text", title:"Region/Country"},
{name:"state", type:"text", title:"State"},
{name:"city", type:"text", title:"City/Municipality"},
{name:"observations", title:"# Observations"},
{name:"lastInspectionDate", type:"date", title:"Last Inspection"}
],
cacheData:data,
clientOnly: true
});
gridObject = isc.ListGrid.create({
dataSource: ds,
dataFetchMode : "local",
autoFetchData: true,
clientOnly: true,
width : "100%",
align : "center",
autoFitData : "vertical",
alternateRecordStyles : true,
canAddFormulaFields : true,
canAddSummaryFields : true,
canGroupBy : true,
canReorderFields : true,
showGroupSummary : true,
groupByMaxRecords : 5,
canMultiGroup: true,
position: "relative"
});
gridObject.getField("static").canHilite=false;
</script>
</body>
</html>
Comment