Setting a checkbox cell in GridWeb

Using Aspose.Cells for .net V4.8, using GridWeb.

I am trying to provide user a feedback of what rows and cells were modfied by changing modified cell background color. I also want to set a checkbox column (always the 1st one) in the modified row. Highlighting works, but I can’t get the checkbox to get set (it is a bound column, just like the other cells). Here is the script code - what am I doing wrong?

function cell_updated(cell)
{
window.alert(“Cell:” + cell.id + “:” + this.getCellValueByCell(cell)); // for debug
this.getActiveCell().orgBgColor = “yellow”; // This works great
this.setCellValue(this.getActiveRow(), “0”, “True”); // This does not

}

Hi,

Well, it might not work, the reason is simple: in the data binding mode, you may not set/get check box checked (data validation) attribute as all the cells in the column are bound cells that share the common options in data binding mode.


Thank you.

Ok, will live without setting a 'row changed' flag, but now I seem to be unable to set the background color of changed checkbox columns. Here is my code (simplified, I just use the passed in cell parameter):

function contract_updated(cell)

{

// Debug: window.alert("Cell:" + cell.id + ":" + this.getCellValueByCell(cell));

cell.orgBgColor = "yellow"; // does not work on checkbox cells?

invalidate(); // set dirty flag so we don;t leave the page w/o a prompt

}

Anything I can do to change background color of changed/clicked on checkbox cells?

Hi,

Well, yes, it will not work smoothly i.e. setting background color to the checkbox validated cells in Data Binding mode as I shared (in previous post) due to bound cells only.

Thank you.

Is there a way to set any databound row column value from the javascript? At the very least I’d like to set a ‘row updated’ flag. If not, can I mix data bound and non-data bound columns in a grid?

Hi,

We will get back to you soon.

Thanks for being patient!

Hi,

Thank you for considering Aspose.

Please try the attached sample code; it works fine for your need in data bound mode.

Thank You & Best Regards,