How can i give fixed size for each columns in my gridview

China☆狼群 提交于 2019-12-24 10:48:23

问题


I have a Grid view and each column have different length of data. i want to customize each columns according to data.

i have added property ControlStyle-Width="400"

but i didnt see any change when i do a debug run.


回答1:


Try the ItemStyle-Width attribute on the column elements

<asp:TemplateField ItemStyle-Width="123" ... />
<asp:BoundField ItemStyle-Width="123" ... />
// etc.


来源:https://stackoverflow.com/questions/6088117/how-can-i-give-fixed-size-for-each-columns-in-my-gridview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!