hello, syncfusion Teams.
When the cellSave function event works , I want to find the information of the next Cell the Row and change the "bgColor".
At this time, QueryCellInfo cannot be used because it does not have changed information.
I tried to use the code as below, but I can't find the following by Frozen Column.
Let me know if you have any solution.
thanks
function treeCellSave(args) {
var test = true;
var argCell = args.cell;
while (test) {
argCell.bgColor = "";
if (argCell.nextSibling == null) {
break;
}
argCell = argCell.nextSibling;
}
}|
cellSave: function(args) { //cellSave event of Grid
var rowIndex = +args.cell.getAttribute('index'); //rowIndex
var cell = args.cell.nextElementSibling;
if (cell === null && (args.column.index < gridInstance.columns.length - 1)) {
cell = gridInstance.getMovableRows()[rowIndex].cells[0]; //get the movable cell
}
}
|
Hi, Rajapandi Ravi.
Thanks for the reply.
As a result of testing, it was confirmed that it was used without any problem.
However, one problem occurred.
There is no problem when editing in the existing Row.
but, when adding a new Row, when the cellSave function works, 'argCell = Grid.getMovableRows()[rowIndex]' becomes undefined.
Can you solve this problem when it is added?
argCell = argCell.nextSibling;
if (argCell === null && (argsCol < Grid.columns.length - 1)) {
argCell = Grid.getMovableRows()[rowIndex];
argCell = argCell.cells[0]; //get the movable cell
}
|
<script>
function cellsave(args) {
var gridInstance = this;
var rowIndex = +args.cell.getAttribute('index'); //rowIndex
var cell = args.cell.nextElementSibling;
if (cell === null && (args.column.index < gridInstance.columns.length - 1)) {
cell = gridInstance.getMovableDataRows()[rowIndex].cells[0]; //get the movable cell
}
}
</script>
|