I have 3 collection datatable that shows in this below
Month: January
ID NAME Absent
001 John 3
002 Travis 0
Month: February
ID NAME Absent
001 John 18
002 Travis 14
Month: March
ID NAME Absent
001 John 10
002 Travis 5
Before, I have used to merge DataTable
dataTable.merge(dataTable2);
The result is like this:
ID NAME Absent
001 John 3
002 Travis 0
001 John 18
002 Travis 14
001 John 10
002 Travis 5
dataTable.Merge(dataTableTemp);
GridView.DataSource = dataTable;
GridView.DataBind();
But, I want to create like this (we say: custom GridView):
Jan Feb Mar Apr
ID NAME Absent Absent Absent Absent
001 John 3 18 10
002 Travis 0 14 5
How to add/merge every month in the right side of table before, so if I add next month it will appear in the right side of table before..
How to create this:??? Is there any method of function or tools that I can use??
Thanks for any help..
Try this:
and this is how you use it: