Is there any way to do this in a datatable in C#? h开发者_开发问答ttp://www.webinformation.ru/eng/reviews/aspnet/merge-cells-in-gridview/
Also want to know if it's possible to add rows dynamically to this.
Since it is explained in VB you can try using the same code but then converted to C# with http://www.developerfusion.com/tools/convert/vb-to-csharp/
[edit]
I noticed some conversions dont work properly, like when you insert (row.Cells(i).RowSpan="2") it returns (row.Cells(i).RowSpan=="2") but I assume you understand this is (row.Cells[1].RowSpan = 2;) in C#.
Also, I can't be sure this will work. It might be possible that VB has namespaces or objects that do not exist in C#.
[/edit]
If not, iirc the column header can be set to whatever you want. It can contain a button, a textbox etc. You can set the header of the 2nd and 3rd row to whatever you want. but sadly I currently dont know a way to join the 2nd and 3rd column headers together on the top part, and keep them apart on the bottom part.
Let me know if either solution helps.
加载中,请稍侯......
精彩评论