Articles in this section
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:

 

WPF

 

WinRT

 

WinForms

 

UWP

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied