Reputation: 171
Is it Possible to merge two Columns to a single column for only one row in a datatable using C#? similar to Merge cells option of the excel
DataTable table = new DataTable();
table.Columns.Add("Column1",typeof (String))
table.Columns.Add("Column2",typeof (String))
table.Columns.Add("Column3",typeof (String))
table.rows.add(table.newrow());
i want to merge column2 and column3 for only first row of the Datatable.
Upvotes: 0
Views: 9724
Reputation: 183
DataTable is not a visible aspect, there will be no need of merging 2 columns, please give the specific requirement. I don't think it is possible too.
Or better create different datatables and merge the datatables rather than merging the columns in a row.
Then in case of gridview scenario, you could have look here :-
Upvotes: 1