如何在我添加的现有数据表中添加新列,但它是bofore行的结尾 [英] how add new column in existing datatable i added but its is come end of the bofore rows
本文介绍了如何在我添加的现有数据表中添加新列,但它是bofore行的结尾的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的数据表包含两列
my datatable contans two columns
ID Value
----- -------
1 100
2 150
我想添加这样的另一列,实际上它位于2行和150行的末尾.但我想从下面的预览开始.
i want to added another column like this ,actually it is come in end of the 2 and 150 row. but i want to start from below preview.
ID Value CourseID
----- ------ ----------
1 100 1
2 150 1
请帮助我
pavan
please help me
pavan
推荐答案
这将为您的DataTable
:
添加一列
This will add a column to yourDataTable
:
dataTable.Columns.Add("CourseID", typeof(int));
这篇关于如何在我添加的现有数据表中添加新列,但它是bofore行的结尾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文