Posted 4 October 2018, 11:25 am EST
Hi,
Would there be a ts code that can manually trigger the itemFormatter func?
We have a requirement that after a particular action ran, we need to apply cell formatting.
this.grid.itemFormatter = (panel, r, c, cell) => {
if (cell && r >= 0 && panel.rows[r].dataItem) {
const matches = this.list.filter((x) => {
return panel.rows[r].dataItem[this.Key] &&
x.field === panel.rows[r].dataItem[this.Key];
});
if (matches.filter((w) => { return w.Code === "A" }).length > 0) {
cell.classList.add("a-class");
}
else if (matches.filter((w) => { return w.Code === "B" }).length > 0) {
cell.classList.add("b-class");
}
}
We already applied the formatting but we would still need to move the horizontal scroll bar before itemformatter get called and the customize color bindings would apply.
Thanks,
Paul