简体   繁体   English

清除Telerik RadSpreadSheet以进行WPF控制

[英]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.

相关问题 带有RadSpreadsheet控件的Silverlight应用程序中的错误 - Error in Silverlight app with RadSpreadsheet control 监视 WPF 中 Telerik ScheduleView 控件的属性更改 - Monitor a change in the property of a Telerik ScheduleView control in WPF WPF,Telerik:禁用时更改控件样式 - WPF, Telerik: Change control style when disabled 绑定telerik整行的背景(颜色):GridViewDataControl WPF控件 - Binding Background (color) for the entire row of a telerik:GridViewDataControl WPF control 如何删除wpf的telerik的RadDesktopAlert控件中的默认关闭按钮,这可能吗? - How to remove default close button in RadDesktopAlert control of telerik for wpf, is this possible? 是否可以使用C#/ WPF控制Telerik RadPropertyGrid的可见性? - Is it possible to control visibility for a Telerik RadPropertyGrid with C#/WPF? 如何从WPF中的Telerik Rad Tilelist控件中删除默认样式? - How to remove default styles from telerik rad tilelist control in wpf? 与Telerik的WPF DataFilter Control类似的东西将如何工作? - How would something similar to Telerik's WPF DataFilter Control work? 是否可以在Telerik WPF主题中覆盖控件模板的一部分? - Is it possible to override one part of a control template in a Telerik WPF theme? WPF绑定Telerik Chartview - WPF Binding Telerik Chartview
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM