Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 asp.net 中,将数据绑定到 gridview 时会出错。说不存在列。
如果编码级别没有列,我该如何限制。
最简单的方法可能是将缺少的列添加到绑定的数据源中。
更难的方法是绑定到枚举实现ICustomTypeDescriptor的类型的数据源。这将让您准确控制列的映射方式。这就是内部实施的方式DataView和实施方式。DataRowView
DataView
DataRowView