I had this problem, too. I just made a workaround that can be an intermediate solution:
First of all, declare a colorpicker and a popup container as in the tutorials, for example:
// colorpicker for edit inline
const colorpicker = new dhx.Colorpicker(null, {
css: "dhx_widget--bordered",
customColors: []
});
// popup container of colorpicker
const popup = new dhx.Popup();
then define a box for popup in the grid and an event handler (note: the idRow var is global):
mygrid = new dhx.Grid( null, {
columns: [
.....
{
id: "rgb",
width: 100,
header: [ { text: "Color<div id='cpbox'></div>" } ],
align: "center",
htmlEnable: true,
template: function (text, row, col) {
return "<span style='background-color: " + text + "; color:" + text + "' >________</span>";
}
],
selection: true,
editable: true
});
mygrid.events.on("CellDblClick", function(row,column,e){
idRow = row.id;
if(column.id == "rgb") {
var coord = mygrid.getCellRect(idRow,"rgb");
popup.show("cpbox",
{centering: true,
mode: "bottom",
indent: 50+coord.y
});
}
});
at last, define the action of colorpicker:
colorpicker.events.on("change", function (color) {
mygrid.data.update(idRow, { "rgb" : color } );
popup.hide();
});
popup.attach(colorpicker);
popup.hide();
mygrid.data.load(URL);
etc.
you can retrive id of row in other ways, f.e. whit the selection api.
If this can be refined, I’ll be happy to know best practices
HI