Hello,
I have a grid that supports a model. But I want to generate different columns renderings depending on a value selected.
eg.
One time the value column needs to be a text box, numeric text box, color selector.
I've managed to do so with everything in java script. But now I want to move the column definition into my database and return a json array butI'm facing one problem and that is the editor property.
The grid is generated if I leave all the editor properties empty. But when I want to use one the grid isn't generated and I'm not getting any javascript errors.
(The editors exists)
This is what my service is returning:
[{"field":"ValidFrom","title":"Valid from","width":"75px","format":"{0:dd/MM/yyyy}"},{"field":"ValidTo","title":"Valid to","width":"75px","format":"{0:dd/MM/yyyy}"},{"field":"Item","title":"Retailer loyalty score","width":"125px"},{"field":"Value","title":"Color","width":"75px","editor":colorEditor,"template":"<div style='background-color: #=Value#;'> </div>"},{"field":"RangeMin","title":"Min score","width":"75px"},{"field":"RangeMax","title":"Max score","width":"75px"},{"field":"Active","title":"Active","width":"50px","editor":customActiveEditor,"attributes":{"style":"text-align: center"},"template":"<div align=center><input style=\"display:none;\" id=\"Active_#=RuleID#\" type=\"checkbox\" #= Active ? \"checked='checked'\" : '' # class=\"k-checkbox chbxItem\" /><label class=\"k-checkbox-label\" for=\"Active_#=RuleID#\"</label></div>\r\n"}]