如何在DataGriedview中显示一个列的长地址 [英] How to Display Long Address in DataGriedview one Column

查看:82
本文介绍了如何在DataGriedview中显示一个列的长地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过打破单行中的行显示Datagridview列中的长地址.....

喜欢这样

名称地址联系

Deepak Vill ......... 23456

Dist ......



Raj等.. ......

How Can i Display A long address in Datagridview column by breaking lines in single row.....
like that
Name Address Contact
Deepak Vill......... 23456
Dist......

Raj etc ........

推荐答案

In windows application, first of all you need to do is changing the DataGridView RowStyle so it can be auto sized based on your content

dataGridView1.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.Fill;
dataGridView1.RowsDefaultCellStyle.WrapMode = DataGridViewTriState.True;

then replace the comma by newline

Eval("test").ToString().Replace(",", System.Environment.NewLine);







谢谢

Sujeet




Thanks
Sujeet


Eval(test)是您的数据。请更新并检查



谢谢

Suijeet
Eval("test") is your data. Please update and check it

Thanks
Suijeet


这篇关于如何在DataGriedview中显示一个列的长地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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