本文介绍了如何从ap.net中的Dataset获取特定列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
我有dataSet。我想从dataSet中获取特定的多个列并添加到Datatable中。如何实现这个???
Hello,
I have dataSet. i want to take specific multiple columns from dataSet and add into Datatable. how to achieve this ???
推荐答案
DataTable newdt;
newdt=ds.Tables[0].Copy(); //here assuming the main table exists in 0th position.
//now remove the unwantd columns
newdt.Columns.Remove("1stcolumn");
谢谢
animesh
thanks
animesh
这篇关于如何从ap.net中的Dataset获取特定列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!