我们如何在运行时增加Gridview的列宽(间距). [英] How can we increase the column width(Spacing) of Gridview at Run-time.
本文介绍了我们如何在运行时增加Gridview的列宽(间距).的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在运行时增加Gridview的列宽(间距).
您可以在图像中看到我的问题:
您可以访问此链接以查看图像(问题).
http://rapidshare.com/files/452538287/Untitled.jpg [
How can we increase the column width (spacing) of Gridview at Run-time.
You can see the my problem in the image:
You can visit this link to view the Image (problem).
http://rapidshare.com/files/452538287/Untitled.jpg[^]
推荐答案
转到设计模式,然后在gridview的属性中,在此处进行设置-
样式>> HeaderStyle>>宽度
HTH
拉杰夫
如果有帮助,请投票并标记答案为可接受.
You may go to the design mode and in the properties of the gridview, set it here -
Styles >> HeaderStyle >> Width
HTH
Rajeev
Please vote and mark the answer as accepted if this helps.
数据绑定到网格中后,应插入以下代码
You should insert the following code after your data bind in your grid
grdResult.Columns[4].ItemStyle.Width = 200;
最好的问候,
Theingi Win
Best Regards,
Theingi Win
这篇关于我们如何在运行时增加Gridview的列宽(间距).的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文