开发者

Gridview Manipulation

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜