Hi crosslife,
To apply the NumberFormat to all newly added cells, including automatically added rows and columns when navigating to the bottom or end using arrow keys, you can set the NumberFormat to text within the QueryRange event. Please see the code snippet below:
private void Spreadsheet_WorkbookLoaded(object sender, Syncfusion.UI.Xaml.Spreadsheet.Helpers.WorkbookLoadedEventArgs args) { spreadsheet.ActiveGrid.QueryRange += ActiveGrid_QueryRange; } private void ActiveGrid_QueryRange(object sender, Syncfusion.UI.Xaml.Spreadsheet.Helpers.SpreadsheetQueryRangeEventArgs e) { if(e.CellType != "Header" && e.ExcelRange.NumberFormat != "@") e.ExcelRange.NumberFormat = "@"; } |
We have prepared the sample based on your requirement, please find the sample with the video reference in the attachment.
Regards,
Sreemon Premkumar M.
Attachment:
WPF_Spreadsheet_Demo_ce6a9410.zip