-1
我在我的WinForms C#项目中使用DevExpress 2009控件。我在GridControl上发现了BandedGridView(_currentView
)的一个问题。 GridControl的DataSource是输入列表(List<MismatchedInfo>()
)。我写了这段代码:获取列表<DataRow> BandedGridView(DevExpress)
List<DataRow> apps = new List<DataRow>();
for (int i = 0; i < _currentView.DataRowCount; i++)
apps.Add(_currentView.GetDataRow(i));
但在结果列表中,应用程序由11个空数据行组成。 在调试器中,我看到的是:
_currentView.DataRowCount == 11
_currentView.GetDataRow(1) == null
_currentView.GetRow(1) != null (object MismatchedInfo from DataSource)
谁能告诉我如何在这种情况下拿到名单?我做错了什么?
谢谢。
我找到答案DevEx文档中:(“如果查看的数据源对象的自定义集合,该GetDataRow方法返回null”那么,如何创建从我的'名单数据行()' ? –