I would like to create some custom grid cells so I can display an icon based on an index supplied via JSON. I have read the documentation on creating custom controls and have following code based on that. I am still not sure how to include the control as a grid field:
var eXcell_connect = {
name: “eXcell_connect”,
$init: function (config) {
this.$view.innerHTML = “”;
},
DefinitionIndex:function(index){
if (index)
this.$view.childNodes[0].src = this.definition[index];
return value;
},
definition: new Array()
};
eXcell_connect.definition[0] = (“an_image.png”);
eXcell_connect.definition[0] = (“an_image2.png”);
dhx.protoUI(eXcell_connect, dhx.ui.grid);
fields: [
{
id: “Link2”,
label: “Link2”,
width: 55,
view:“eXcell_connect”,
DefinitionIndex:“0”
},