We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Change cell color on client side

Hi all,

Is there any API or example in Javascript to change backcolor of a cell when I knew the row and col number of it?


I think you may use cell.style.background attribute to specify the backcolor of the cell in Aspose.Cells.GridWeb on client side:
Sample code:

cell.style.backgroundColor = "yellow";

Thanks for your help.
However, is there any api can call a specifically ‘cell’ object by row and col value in client side?
(I found examples that using for loop to a grid instead of specifically one)


I think you may try to use the “this.getCell(row, column)” method to read any cell by specifying the desired row & column parameters in GridWeb.
Sample code:

var cell1 = this.getCell(0, 0); // get the cell "A1"

Hope, this helps a bit.