asp.net 3.5中的网格视图 [英] grid view in asp.net 3.5
本文介绍了asp.net 3.5中的网格视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我在asp.net 3.5中有一个网格视图
现在,当没有.的列数增加(> 3)
我的网格视图从面板退出(在运行时)
如果没有,我想要那个.的列数增加
滑动条就像在
中的datagridview中一样
窗口应用程序
怎么起泡
预先比thanxz
hi all
i have a grid view in asp.net 3.5
now when the no. of columns increases (>3)
the my grid view comes out of pannel(at run time)
i want that when no. of columns increases
a slid bar comes like in datagridview in
window application
how it sud be done
thanxz in advance
推荐答案
如果GridView的大小不足以显示所有项目,则用户可以使用滚动条提供的水平或垂直方向滚动,滚动条由ScrollViewer控件.如果所有内容在特定方向上可见,则ScrollBar将隐藏.列标题不使用垂直滚动条滚动,而是水平滚动.
If the size of the GridView is not large enough to display all the items, users can scroll horizontally or vertically by using scrollbars, which are provided by a ScrollViewer control. A ScrollBar is hidden if all the content is visible in a specific direction. Column headers do not scroll with a vertical scroll bar, but do scroll horizontally.
Gridview没有Scrollbar属性,因此您必须使用两件事来实现此
1个Div标签
< div id ="scrollP" style ="overflow:scroll; height:100px;
宽度:200px;>
< asp:GridView ID ="GridView1" runat ="server">
</asp:GridView>
</div>
2面板控制
< asp:Panel ID ="Panel1" ScrollBars ="Both" runat ="server" Width ="220px">
< asp:GridView ID ="GridView1" runat =服务器"
</asp:GridView>
</asp:Panel>
Gridview have not Scrollbar property so you have to use two things to achieve this
1 Div Tag
<div id="scrollP" style="overflow:scroll;height:100px;
width:200px;">
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</div>
2 Panel control
<asp:Panel ID="Panel1" ScrollBars="Both" runat="server" Width="220px">
<asp:GridView ID="GridView1" runat="server"
</asp:GridView>
</asp:Panel>
这篇关于asp.net 3.5中的网格视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文