我希望在下一行显示结果后合并整行

时间:2016-07-16 10:42:02

标签: vb.net

实际输出是:

|ctrcode|ctrname|empcode|empname|ewt |percent%|
|_______|_______|_______|_______|____|________|
|1      |Chain  |1001   |A      |25.6|15      |
|_______|_______|_______|_______|____|________|
|2      |Chain  |1002   |B      |15.6|10      |
|_______|_______|_______|_______|____|________|

但我想:

|empcode|empname|ewt |percent%|
|_______|_______|____|________|
|Chain                        |
|_____________________________|
|1001   |A      |25.6|15      |
|_______|_______|____|________|
|1002   |B      |15.6|10      |
|_______|_______|____|________|

如何让它看起来像这样?我使用了DataGridView并填充了网格。

1 个答案:

答案 0 :(得分:0)

据我所知,

DataGridView无法合并单元格。请参阅此主题,以找到替代解决方案:https://social.msdn.microsoft.com/Forums/windows/en-US/fea3dcff-5447-450a-8f7c-bb1c4f63371d/merging-cells-in-datagridview?forum=winformsdatacontrols

周末愉快。