Click here to Skip to main content
16,012,153 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my datatable contans two columns

ID     Value
-----  -------
1      100
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


please help me
pavan
Posted
Updated 10-Sep-11 2:24am
v2

1 solution

This will add a column to your DataTable:

C#
dataTable.Columns.Add("CourseID", typeof(int));
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900