[英]Clearing Telerik RadSpreadSheet for WPF Control
I am using a Telerik RadSpreadSheet in a WPF application to display different pieces of data. 我在WPF应用程序中使用Telerik RadSpreadSheet来显示不同的数据。 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("");
}
}
尝试这个:
radSpreadsheet.ActiveWorksheet.Cells[0, 0, rowCount - 1, columnCount - 1]?.ClearValue();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.