BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi Austin,
Thanks for using Syncfusion product.
You can set the background color of the cell in Spreadsheet control by setting the Color of the XlsIO range like in the below code snippet.
Code Snippet[C#]:
IRange range = this.spreadSheetControl.ExcelProperties.WorkBook.ActiveSheet[3,3,5,5]; var clr = Colors.Blue; range.CellStyle.Color = System.Drawing.Color.FromArgb(clr.A, clr.R, clr.G, clr.B); this.spreadSheetControl.GridProperties.ActiveSpreadsheetGrid.InvalidateCell(GridRangeInfo.Cells(3, 3, 5, 5));
|
We have prepared a sample based on this and you can find the sample from the below location.
Please let us know if you have any other queries.
Thanks,
Pannir
Hi Austin,
Apologize for the delay.
You can achieve your requirement by calling the InvalidateVisual() of grid after apply the background color to the cell like in the below code snippet.
Code Snippet[C#]:
var grid = this.spreadSheetControl.GridProperties.ActiveSpreadsheetGrid; IRange range = this.spreadSheetControl.ExcelProperties.WorkBook.ActiveSheet[3, 3]; var clr = Colors.Blue; range.CellStyle.Color = System.Drawing.Color.FromArgb(clr.A, clr.R, clr.G, clr.B); grid.InvalidateCell(GridRangeInfo.Cell(3, 3)); grid.InvalidateVisual();
|
We have attached a sample based on this and you can find the sample from the below location.
Please let us know if you have any other queries.
Thanks,
Pannir
Hi Austin,
Thanks for your update.
Regards,
Pannir