I am using a Telerik RadSpreadSheet in a WPF application to display different pieces of data. Between each set of data I clear the spreadsheet. The only way I've found to do this is clearing each cell. This works, but it feels wrong. Is there a better solution?
for (int x = 0; x < rowCount; x++) {
for (int y = 0; y < columnCount; y++) {
radSpreadsheet.ActiveWorksheet.Cells[x, y].SetValue("");
}
}
Try this:
radSpreadsheet.ActiveWorksheet.Cells[0, 0, rowCount - 1, columnCount - 1]?.ClearValue();