我现在的方法用的是Gridview 72般绝技中的CSS控制.
我加上一个Panel用来实现纵横向的滚动.当Gridview的栏位比较少时,只有纵向需要拖动,一切都还好~
可是~当Gridview的栏位多起来时,表头就超出了Panel.横向拖动只拖动了Item部分,表头不随着滚动条而动,大刺刺的超出了panel.
请教解决办法.
我加上一个Panel用来实现纵横向的滚动.当Gridview的栏位比较少时,只有纵向需要拖动,一切都还好~
可是~当Gridview的栏位多起来时,表头就超出了Panel.横向拖动只拖动了Item部分,表头不随着滚动条而动,大刺刺的超出了panel.
请教解决办法.
解决方案 »
- 一个JS问题,别发什么思路连接,答对立刻给分!
- 帮忙看看这个web service是用的什么技术限制别人访问的?
- asp.net网站通常以什么形式发布,只可以是aspx么?
- 誰知道如何動態建立一個存儲過程啊
- 柱图生成问题
- 菜鸟请教:dropdownlist的定义宽度的问题
- System.DateTime currentTime=new System.DateTime(); 怎样在页面上输出currentTime的值?
- 如何用.net c# 在sql sever2000里存入图片 然后在网页里从数据库读出来
- 用asp:Button时,源代码总显示submit,怎么才能显示button呢?
- 请问在ado.net中如何取得SQL存储过程中用return返回的值?在线揭贴
- 求教一个问题DBHelper类的问题 高手赐教
- 居中对齐问题
function s()
{
var t = document.getElementById("<%=GridView1.ClientID%>");
var t2 = t.cloneNode(true)
for(i = t2.rows.length -1;i > 0;i--)
t2.deleteRow(i)
t.deleteRow(0)
a.appendChild(t2)
}
window.onload = s
</script>
------------------------------------------------------------------------
<div style="overflow-y: scroll; height: 200px">
<asp:GridView ID="GridView1" runat="server" EnableViewState="true" AllowPaging="true" PageSize="12" AutoGenerateColumns="False"
BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="3" Font-Size="13px" style="left: 1px; position: relative; top: 0px; z-index: 100; width:100%" OnPageIndexChanging="GridView1_PageIndexChanging" OnRowDataBound="GridView1_RowDataBound">
<Columns>
<asp:TemplateField>
<ItemTemplate>
<input name="chk" type="checkbox" value="<%#Eval("InfoID")%>" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="InfoID" HeaderText="资讯ID" ItemStyle-Width="20px"/>
<asp:BoundField DataField="Title" HeaderText="资讯标题"/>
<asp:BoundField DataField="Source" HeaderText="资讯来源"/>
<asp:BoundField DataField="CreateTime" HeaderText="发布日期" ItemStyle-Width="60px"/>
<asp:BoundField DataField="ColumnName" HeaderText="所属栏目"/>
</Columns>
<FooterStyle BackColor="White" ForeColor="#000066" />
<RowStyle ForeColor="#000066" />
<SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
<HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" CssClass="Freezing"/>
</asp:GridView>
</div>
·详情请访问:http://www.515dns.com