I’m trying to create a grid that will serve as a picklist for a field, but I can’t seem to make it right. Can anyone help me?
Here’s the code:
isc.ListGrid.create({
ID: "countryList",
width:620, height:224, alternateRecordStyles:true,
cellHeight:42, wrapCells:true,
fields:[
{name:"countryName", width:100},
{name:"government", width:175,
editorType:"textArea",
editorProperties:{height:40}
},
{name:"population", width:100, formatCellValue:"isc.Format.toUSString(value)",
editorType:"selectItem", editorProperties: {
fields:[
{name:"check", editorType:"boolean"},
{name:"value"}
],
data:[
{check:false, value:"First"},
{check:false, value:"Second"},
]
}
},
{name:"independence", width:225,
editorProperties:{useTextField:false}
}
],
autoFetchData: true,
canEdit: true,
editEvent: "click"
})
countryList.addData({countryName:"Croatia", government:"Democracy", population:"4000000", independence: "Yes"});