I am using the datagridview. I do not know how to correctly setup an editor for the Type column. I want a dropdown like this:
<select>
<option value-"0">OL</option>
<option value-"1" selected>CR</option> <!-- selected if value in field is 1 -->
<option value-"2">WB</option>
</select>
Here's the columns code:
columns:[[
{field:'prg_code',title:'Prg Code',width:80,sortable:true},
{field:'state',title:'State',width:100,sortable:true},
{field:'type',title:'Type',width:80,align:'right',
editor:{type:'combobox',
options:{valueField:'type',
textField:'type',
data:[{txt:'OL',val:'0'},{txt:'CR',val:'1'},{txt:'WB',val:'2'}]
}
}
}
]],
Here's the fiddle:
http://jsfiddle.net/Mrbaseball34/qdt8t7jr/