C# 在datagridview中合并单元格

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2063951/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 23:10:49  来源:igfitidea点击:

Merge cells in datagridview

c#.netwinforms

提问by Thunder

Is there a way to merge cells in datagridview of .net in winforms .I would like to merge two or more cells of a row .

有没有办法在winforms中合并.net的datagridview中的单元格。我想合并一行的两个或多个单元格。

采纳答案by SwDevMan81

You'll have to implement the OnPaint Event and do it yourself. Hereis an example. You could also check out SourceGrid

您必须实现 OnPaint 事件并自己完成。 是一个例子。您还可以查看SourceGrid