gridview宽度. [英] gridview width.

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

问题描述

有人能让我知道吗
如何修复或设置gridview宽度.
填充数据后,列将被拉伸,并且遍及整个
网格宽度增加.

设置网格的宽度后,应具有滚动条.
和大小不能增加
怎么做.

谢谢
Shanawaz

解决方案

将gridview放入div或panel之类的容器中,并设置panel的宽度.如果要固定gridview的宽度,请同时设置gridview的宽度.

您可以在gridview的宽度大于面板的宽度时显示滚动条.

你好,

你可以这样

<div style="height: 260px; width: 470px; overflow: auto; vertical-align: top;">
<asp:DataGrid ID="dgAPVender" AccessKey="G" runat="server" CssClass="clsGrid" BorderColor="Desktop" CellPadding="3" AutoGenerateColumns="False" Width="450px">
//Gridview content here
</asp:DataGrid>				
</div>


can any body let me know
How to fix or set the gridview width.
When the data is populated,columns get stretched, and over all
width of grid get increased.

After setting the width of grid, it should have Scrolbar.
and size must not get increased
How to do this.

Thanks
Shanawaz

解决方案

Put the gridview in a container like div or panel and set width for panel.If you want to fix the gridview width set width for gridview also.If you give more width to gridview than panel then it''ll show scrollbar.


you can set the cssclass in gridview''s itemstyle after you wrote the css code that you need


Hello,

You can do like this

<div style="height: 260px; width: 470px; overflow: auto; vertical-align: top;">
<asp:DataGrid ID="dgAPVender" AccessKey="G" runat="server" CssClass="clsGrid" BorderColor="Desktop" CellPadding="3" AutoGenerateColumns="False" Width="450px">
//Gridview content here
</asp:DataGrid>				
</div>


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

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