1

I have a gridview1 with 2 columns A and B, and I want to be able to copy those columns into gridview2, which has 3 columns A B and C, where A and B have the same headings as A and B in gridview1. How do I do this in C#?

1 Answers1

0

If you are dynamically binding gridview1 with the datatable, then you can add the column C to the datatable and bind it to gridview2.

If you dont have the datatable then you can try converting the gridview1 data to datatable and add the coulmn C and then bind to gridview2.

as in post: How can I export a GridView.DataSource to a datatable or dataset?

Community
  • 1
  • 1
ray
  • 457
  • 3
  • 9