是否可以根据内容改变行的高度 - 我正在使用System.Windows.Forms.DataGrid [英] Is it possible to vary the height of a row depending on content - I am using a System.Windows.Forms.DataGrid

查看:52
本文介绍了是否可以根据内容改变行的高度 - 我正在使用System.Windows.Forms.DataGrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过Visual Studio代码映射跟踪了用于绘制数据行的关键方法 - 但不能覆盖任何内容,因为它们不是公共类,而是内部类(datagridrelationshiprow)或内部抽象类(DataGridRow(windows.system.forms))



如果我可以覆盖这些类中的方法 - 我觉得我可以改变代码来改变高度基于内容的默认值。

解决方案

似乎根据其内容调整行的高度 - 已提供...只需要进行适当的设置。请查看以下MSDN链接:



http://msdn.microsoft.com/en-in/library/74b2wakt(v = vs.90).aspx [ ^ ]



http:// msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.autosizerowsmode(v=vs.110).aspx [ ^ ]



http://msdn.microsoft。 com / en-us / library / ms158610(v = vs.110).aspx [ ^ ]

I have traced all calls through Visual Studio code map to the critical methods used for painting the rows of data - but can not override anything because they are not public classes but internal classes (datagridrelationshiprow )or internal abstract classes ( DataGridRow ( windows.system.forms ) )

If I could override methods in these classes - I feel I could then change code to change the height from the default based on the content.

解决方案

It seems resizing the height of a row based on its content - is provided already...just you need to do appropriate setting. Please have a look on following MSDN links:

http://msdn.microsoft.com/en-in/library/74b2wakt(v=vs.90).aspx[^]

http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.autosizerowsmode(v=vs.110).aspx[^]

http://msdn.microsoft.com/en-us/library/ms158610(v=vs.110).aspx[^]


这篇关于是否可以根据内容改变行的高度 - 我正在使用System.Windows.Forms.DataGrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆