BlazorDatasheet icon indicating copy to clipboard operation
BlazorDatasheet copied to clipboard

Set the BackgroundColor-Value of a cell to null

Open mawagi7 opened this issue 1 year ago • 2 comments

Hi,

the initial "BackgroundColor"-value of a cell is null.

How can I reset a (red colored) cell?

Currently I'm able to set the background color to white ("#FFFFFF"). But in this case there is no border at the right and bottom.

Following call leaves the cell in red color:

Sheet.SetFormat(Sheet.Selection.Regions, new CellFormat() { BackgroundColor = null });

Is there any solution for this problem?

mawagi7 avatar Aug 01 '24 14:08 mawagi7

Hi @mawagi7 this is an oversight by me, and it isn't currently possible.

For now, you could do:

Sheet.SetFormat(Sheet.Selection.Regions, new CellFormat() { BackgroundColor = " "});

and it won't show a bg color.

I'll work on a fix for this, thanks for the feedback.

anmcgrath avatar Aug 05 '24 22:08 anmcgrath

Thanks for the fast reply and your great work.

mawagi7 avatar Aug 12 '24 08:08 mawagi7