清除 WPF 控件的 Telerik RadSpreadSheet

Clearing Telerik RadSpreadSheet for WPF Control

我在 WPF 应用程序中使用 Telerik RadSpreadSheet 来显示不同的数据。在每组数据之间,我清除了电子表格。我发现这样做的唯一方法是清除每个单元格。这行得通,但感觉不对。有更好的解决方案吗?

for (int x = 0; x < rowCount; x++) {
  for (int y = 0; y < columnCount; y++) {
    radSpreadsheet.ActiveWorksheet.Cells[x, y].SetValue("");
  }
}

试试这个:

radSpreadsheet.ActiveWorksheet.Cells[0, 0, rowCount - 1, columnCount - 1]?.ClearValue();