I want create datatable where need to add two lines of columns.
Example :
First Column : Name Surname
rows Jon Trav
Jake Xcs
Second column : BirthDay age
rows xxxxxx yyy
xxxxxx vvv
thanks a lot
VulpesPosted Feb 6, 2013, 6:48 AM
The reason I wouldn't recommend it is that you might need to split the column values for display purposes if the spacing wasn't quite right and you'd need to use the string type for the second column as dates and integers are not compatible with each other. This might make life difficult if you wanted to manipulate the individual values.
Anyway, the code for this approach would be as follows. The output would be the same as before:
VulpesPosted Feb 6, 2013, 6:13 AM
However, you then use or display those columns in any way you like.
For example (using a console app for simplicity) you could do this:
The output should be:
Posted Feb 6, 2013, 5:57 AM
in Your answer there are 4 columns.But I need to add tow lines of columns.
first line Name,surname - and its rows.
thens second line birthday,age - and its rows.
as shown below
VulpesPosted Feb 6, 2013, 5:47 AM