Originally posted by Isomorphic
View Post
I see it's fixed, thank you very much
replacementValue: isc.Canvas.imgHTML(spritePrefix+"#icon-forward;size:16,16;")
var ds = isc.DataSource.get("countryDS");
var spriteFile = "[ISOMORPHIC]system/reference/inlineExamples/svg/mediaPlayer.svg";
// the special prefix "sprite:svg:" causes the browser to access the spriteFile svg file to
// re-<use> the template <symbol> tags defined there
var spritePrefix = "sprite:svg:" + spriteFile;
// array of hilite-objects to apply to the grid
var hiliteArray =
[
{
fieldName:[
"area",
"gdp"
],
replacementValue: " ",
icon:spritePrefix+"#icon-forward;size:16,16;",
criteria: {
_constructor: "AdvancedCriteria",
operator: "and",
criteria: [
{
fieldName: "gdp",
operator: "greaterThan",
value: 1000000
},
{
fieldName: "area",
operator: "lessThan",
value: 500000
}
]
}
}
]
;
isc.VLayout.create({
ID:"layout",
width:600, height:250,
membersMargin: 5,
members: [
isc.HLayout.create({
ID:"buttonLayout",
width:"*", height:30,
membersMargin: 10,
members: [
isc.IButton.create({
ID: "editHilitesButton",
autoFit: true,
title: "Edit Hilites",
click: "countryList.editHilites();"
}),
isc.IButton.create({
ID: "stateButton",
autoFit: true,
title: "Recreate from State",
click: function () {
var state = countryList.getHiliteState();
countryList.destroy();
// don't include the hilite array in the create statement to demonstrate
// re-application from state via setHiliteState()
recreateListGrid(false);
countryList.setHiliteState(state);
}
})
]
})
]
});
// Create the initial ListGrid. See comment below for parameter description.
recreateListGrid(true);
// Function to create a new ListGrid. On the first call, passes "true" as the parameter, such
// that the hiliteArray above is included in the create() statement. Subsequent calls pass false,
// meaning no hiliteArray is included and a separate call to setHiliteState() is used instead.
function recreateListGrid(includeHilites) {
layout.addMember(isc.ListGrid.create({
ID: "countryList",
width:"100%", height:"*",
dataSource: ds,
autoFetchData: true,
canAddFormulaFields: true,
canAddSummaryFields: true,
fields:[
{name:"countryCode", title:"Flag", width:60, type:"image", imageURLPrefix:"flags/24/",
imageURLSuffix:".png"
},
{name:"countryName", title:"Country"},
{name:"capital", title:"Capital"},
{name:"population", title:"Population"},
{name:"area", title:"Area"},
{name:"gdp"}
],
hilites: includeHilites ? hiliteArray : null
}));
}
replacementValue: isc.Canvas.imgHTML("[SKINIMG]/actions/exclamation.png", 16, 16)
Leave a comment: