有谁知道如何使数据网格中的列文本变为多行? [英] Does anyone know how to make the text of a column in a data grid multiline?
本文介绍了有谁知道如何使数据网格中的列文本变为多行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人知道如何使数据网格中多行的列文本吗?
Does anyone know how to make the text of a column in a data grid multiline?
推荐答案
使用CellPainting事件,在单元格样式上使用WrapMode = DataGridViewTriState.True
像在此网站上提倡的: http://bytes.com/topic/c-sharp/answers/619756-datagridview-how-toggle-multiline-row [
Use the CellPainting event and on the cell style useWrapMode = DataGridViewTriState.True
like advocated on this site: http://bytes.com/topic/c-sharp/answers/619756-datagridview-how-toggle-multiline-row[^].
Hope that helps you achieve the desired effect.
Happy coding!
-MRB
这篇关于有谁知道如何使数据网格中的列文本变为多行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文