gridView中的滚动条 [英] Scroll bar in gridView

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

问题描述

您好我正在使用带有Gridview的asp.net进行项目,我正在使用Panel Control执行此任务但面板在我的网页上显示,而我不使用gridview

i仅在gridview时才需要它会打电话给

请给我推荐一些滚动我的网格视图的工具。



我的面板代码



Hi I am doing a project using asp.net with Gridview ,i am using Panel Control for this task but panel appering on my web page while iam not using gridview
i want it apper only when gridview will call
please suggest me some other tool for scrolling my gridview.

My Code for Panel

<asp:Panel ID="scrollableGridArea" runat="server"

      style="overflow:scroll; height: 300px; width: 1000px; z-index: 105; left: 10px; position: absolute; top: 120px;"

      CssClass="GridviewScrollPager" >
   <asp:GridView ID="GridView1" runat="server" BackColor="White" BorderColor="#CCCCCC"

              BorderStyle="None" BorderWidth="1px" CellPadding="3"

              style="z-index: 100; left: 0px; position: absolute; top: 0px"

              CssClass= "GridviewScrollHeader"   >
       <FooterStyle BackColor="White" ForeColor="#000066" />
       <RowStyle ForeColor="#000066" HorizontalAlign="Center" />
       <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
       <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
       <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
   </asp:GridView>
       </asp:Panel>

推荐答案

http://csharpdotnetfreak.blogspot.com/2009/07/scrollable-gridview-fixed- headers-asp.html [ ^ ]



http://www.aspdotnet-suresh.com/2011/11/how-to-implement-scrollable-gridview.html [ ^ ]


访问这里



http://csharpdotnetfreak.blogspot.com/2009/07/scrollable-gridview-fixed-headers -asp.html [ ^ ]







http://www.aspnettutorials.com/tutorials/controls/gridviewscroll-aspnet2-csharp/ [ ^ ]
visit here

http://csharpdotnetfreak.blogspot.com/2009/07/scrollable-gridview-fixed-headers-asp.html[^]

or

http://www.aspnettutorials.com/tutorials/controls/gridviewscroll-aspnet2-csharp/[^]


我相信您希望在数据为空时隐藏整个面板。为此,设置
I believe you want the entire panel to be hidden when the data is empty. For this, set the
if (data.Rows.Count == 0)  scrollableGridArea.Visible = false;



至于滚动,如果你想保持标题锁定和如果数据滚动,您可以将标题放在网格上方的单独表格中,并使网格自己的ShowHeader = false。然后将网格包装在


As for scrolling, if you want to keep the headers locked and data getting scrolled, you can place headers in separate table above the grid and have the grid's own ShowHeader=false. Then wrap the grid in a

<div style="height:200px; overflow: scroll">
<asp:gridview ...="" xmlns:asp="#unknown">grid properties 
</asp:gridview></div>


这篇关于gridView中的滚动条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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