有没有一种简单的方法可以将基础设施 UltraGridRow
转换为标准 DataRow
对象?
最佳答案
如果您已将 UltraGrid 的 DataSource 设置为 DataTable,那么您可以使用
提取当前 ActiveRow 的底层 DataRow if(grid.ActiveRow != null && grid.ActiveRow.IsDataRow)
{
DataRow row = (grid.ActiveRow.ListObject as DataRowView).Row;
}
当然,您可以将此示例的 ActiveRow 替换为 IsDataRow 属性为 true 的每个 UltraGridRow(注意 SummaryRows 和 OutlookGroupByRow)
请注意,如果您将 List<CustomClass>
绑定(bind)到 DataSource然后是 ListObject
能够返回 CustomClass
的单个实例
关于c# - 将 Infragistics UltraGridRow 转换为 DataRow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18700866/