Category / Section
Format the cells while inserting rows/columns at runtime in WinRT Spreadsheet.
2 mins read
While inserting rows or columns in a SfSpreadsheet, you can able to format the newly inserted cells by using the CellStyle of XlsIO’s IRange like below code example and then invalidate the grid to update it in view.
C#
Spreadsheet.ActiveGrid.Model.InsertRows(5, 1); Spreadsheet.ActiveSheet.InsertRow(5, 1); Spreadsheet.ActiveSheet["A5:CV5"].CellStyle.ColorIndex = ExcelKnownColors.Aqua; Spreadsheet.ActiveGrid.InvalidateCell(GridRangeInfo.Row(5));
Sample links: