GridView 实现固定表头,但可以纵向,横向滚动Item
一. 可以纵向,横向滚动Item
<DIV style="Z-INDEX: 102; LEFT: 184px; OVERFLOW: auto; WIDTH: 100%;POSITION: absolute;TOP: 200px; HEIGHT: 440px">
<asp:GridView ID="gv_Data" runat="server" AutoGenerateColumns="False" AllowPaging="false"
Width="100%" OnRowCreated="gv_Data_RowCreated" OnRowDataBound="gv_Data_RowDataBound" Height="280px">
….
二.可以纵向,但不横向滚动Item
<div style="overflow: auto; width: 830px; height: 390px">
<asp:GridView ID="gv_Data" runat="server" AutoGenerateColumns="False" AllowPaging="false"
Width="100%" OnRowCreated="gv_Data_RowCreated" OnRowDataBound="gv_Data_RowDataBound" Height="280px">
…..
本文介绍如何使用GridView实现固定表头,并支持Item的纵向及横向滚动效果。一种方式是通过设置Div的样式属性为overflow:auto,width和height来实现纵向和横向的滚动;另一种方式则仅允许纵向滚动。
358

被折叠的 条评论
为什么被折叠?



