Datagrid包装柱 [英] Datagrid wrapping column

查看:71
本文介绍了Datagrid包装柱的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要为COLUMN换行,以防止显示宽范围的任务列表.

I need to wrap text for the COLUMN to prevent wide task list displays.

推荐答案

我很确定它是如此简单:

将列的换行模式设置为true,然后为网格调用AutoResizeRows.像这样:
I''m pretty sure it''s as easy as this:

Set the column''s wrap mode to true, then call the AutoResizeRows for the grid. Like this:
dgvGrid.Columns("ColumnName").DefaultCellStyle.WrapMode = DataGridViewTriState.True
dgvGrid.AutoResizeRows(DataGridViewAutoSizeRowsMode.AllCells)


这篇关于Datagrid包装柱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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