Share via


Merge Cells (Horizontally) in datagridview (Winforms)

Question

Monday, October 5, 2015 12:49 PM

Hi,

Before I ask my concern, I would like to know the members of this forum that I have seached the web for the solution on my problem which is mentioned in the header but didn't get the perfect solution. So, I am posting my concern here. Your help is greatly appriciated.

I would like to achive following using the datagridview in VB.NET. I am not sure how would I merge the cells to get the row with text as "TOTAL".

Thanks!

SwadPune

All replies (1)

Monday, October 5, 2015 2:33 PM âś…Answered

There is no direct support for displaying totals in this manner, especially if the DataGridView is bound to a database. You may want to consider using additional controls to display the totals below the DataGridView. The only other option would be to use the CellPainting event to merge the cells together.

http://forums.codeguru.com/showthread.php?415930.html

Paul ~~~~ Microsoft MVP (Visual Basic)