Apply the AsEnumerable() extension to your DataTable, allowing you to select the data you want and return it as a collection. By using the extension AsDataView(), the collection is then returned as a friendly DataView object:
for example:
var dv = (from dr in ds.Tables[0].AsEnumerable()
where dr[0] == x
select dr).AsDataView();
No comments:
Post a Comment