想要在Datagrid中设置列的宽度 [英] Want to set the width of Column in Datagrid

查看:70
本文介绍了想要在Datagrid中设置列的宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在编写代码来为我的Mobile应用程序设置datagrid中列的宽度.但是我在下一行出现错误.

DataGrid1.TableStyles(0).GridColumnStyles(1).Width = 10

错误是指定的参数超出有效值范围"

任何人都可以在错误的地方帮我,或者以其他方式在datagrid中设置列宽.


预先感谢.

Hi Everyone,

I am writing a code to set the width of column in datagrid for my Mobile application. But I am getting an error at the below line.

DataGrid1.TableStyles(0).GridColumnStyles(1).Width = 10

Error is "Specified argument is out of the range of valid values"

Can anyone help me where I am wrong, or any other way to set the column width in datagrid.


Thanks in advance.

推荐答案

http ://www.daniweb.com/software-development/mobile-development/threads/345587 [ http://www.webdeveloper.com/forum/showthread.php?t=183774 [ ^ ]
http://www.daniweb.com/software-development/mobile-development/threads/345587[^]
http://www.webdeveloper.com/forum/showthread.php?t=183774[^]


您是否尝试在后面添加列代码?

如本链接所述:
http://stackoverflow.com/questions/1051690/column-width-of-a-datagrid-in-a-windows-mobile-application [
Did you try to add the Columns code behind ?

As mentioned in this link:
http://stackoverflow.com/questions/1051690/column-width-of-a-datagrid-in-a-windows-mobile-application[^]


这篇关于想要在Datagrid中设置列的宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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