大家好, 我想要使用固定页眉和页脚的Scrollable GridView使用CSS类并在GridView页眉和页脚中调用该Css类。但问题是当我向下滚动标题丢失时,当我向上滚动页脚丢失时。但我想修复页眉和页脚并仅滚动DataRow对象。这该怎么做。任何人都可以给我一些有价值的建议.. 我的代码如下所示
< style type =text / css>。 GVFixedHeader { font-weight : 粗体背景颜色:绿色position:relative top:expression(this.parentNode.parentNode.parentNode.scrollTop-1)} 。 GVFixedFooter { font-weight : 粗体背景 - 颜色:绿色位置:相对底部:表达式(getScrollBottom(this.parentNode.parentNode.parentNode.parentNode))} < / style>< script language = javascript type = text / javascript> function getScrollBottom(p_oElem){ return p_oElem.scrollHeight - p_oElem.scrollTop - p_oElem.clientHeight}< /脚本>
并在Grid Header,Footer样式中调用Css类。
< FooterStyle BackColor = #507CD1字体 - 粗体= True ForeColor = White CssClass = GVFixedFooter / > < HeaderStyle BackColor = #507CD1 Font-Bold = True ForeColor = 白色 CssClass = GVFixedHeader />注意:将我的网格放在Panel Control中 请找到附件以便更好地理解.. 在此先感谢... [可滚动] [可滚动]
解决方案试试这个...... :) www.aspsnippets/Articles/Scrollable-GridView-with-Fixed-Headers-in-ASP.Net .aspx [ ^ ] 如果你想简单, < div style = overflow:auto; widht:100%; height:YourHeight > < asp:gridview xmlns:asp = #unknown > ..... < / asp:gridview > < / div >
Hi Everybody, I want Scrollable GridView with Fixed header and Footer for that purpose im using CSS class and call that Css class in GridView Header and footer also. But whats the problem is when i scroll down header is missing , when i scroll up footer is missing. But i want to fix header and footer and scrolling only DataRow objects . How to do this. Can any one give me some valueble suggestions out of this.. My code is look like below
<style type="text/css">.GVFixedHeader { font-weight:bold background-color: Green position:relative top:expression(this.parentNode.parentNode.parentNode.scrollTop-1)}.GVFixedFooter { font-weight:bold background-color: Green position:relative bottom:expression(getScrollBottom(this.parentNode.parentNode.parentNode.parentNode))} </style><script language="javascript" type="text/javascript"> function getScrollBottom(p_oElem) { return p_oElem.scrollHeight - p_oElem.scrollTop - p_oElem.clientHeight }</script>
and call that Css class in Grid Header, Footer styles.
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" CssClass="GVFixedFooter"/> <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" CssClass="GVFixedHeader" />Note: Place my grid inside Panel Control Please find the attachments for better understanding.. Thanks in Advance... [ scrollable] [ scrollable]
解决方案 Try this...:) www.aspsnippets/Articles/Scrollable-GridView-with-Fixed-Headers-in-ASP.Net.aspx[^] if you want simple, <div style="overflow:auto; widht:100%; height:YourHeight"> <asp:gridview xmlns:asp="#unknown"> ..... </asp:gridview> </div>更多推荐
具有固定页眉和页脚的可滚动gridview
发布评论