Create ADO.NET DataView showing only selected Columns

后端 未结 4 978
长情又很酷
长情又很酷 2021-01-04 19:09

In C# & .NET, can one create a DataView that includes only a proper subset of the DataColumns of a given DataTable?

4条回答
  •  离开以前
    2021-01-04 19:44

    Well I can't see any reason for "wanting" to do that... Remember, a DataView is just a list of pointers to the rows in the original table, and there is obviously no way to remove columns from the the original table... at least not without affecting every other function utilizing that table... Just only use the columns you want...

提交回复
热议问题