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.
我正在开发一个模块,我必须创建 15 个Datatables并将数据表绑定到数据绑定控件。
Datatables
我想用listview控件来绑定dt。
listview
是否可以绑定multiple datatables到 a single listview?所有 15 个数据表都包含相同的列名。
multiple datatables
single listview
您可以先合并DataTables,然后将合并后的数据表绑定到listview。像这样的东西:
DataTable merged = new DataTable(); merged.Merge(table1); merged.Merge(table2); merged.Merge(table3); //Merge the rest of the data tables. lvMyList.DataSource = merged; lvMyList.DataBind();