我正在实现带有垂直滚动条的Gridview冻结标题。我尝试了很多在这里建议的解决方案,但问题是:
有什么建议吗?
- Gridview在面板中,其宽度不固定,为97%。
2. 列宽度不固定。
我尝试了GridviewScroll.js中建议的解决方案,但问题在于宽度固定,Gridview不会根据窗口大小调整大小。
我尝试了很多解决方案,但没有一个在没有固定宽度的情况下可以正常工作,因此我无法在此处展示。
以下是我的现有代码:
<asp:Panel ID="panel_gridholder" runat="server" style="position:absolute;left:10px;width:97%; min-width:1020px;margin-top:3px;margin-bottom:20px;overflow:auto;" >
<asp:GridView ID="GridView_Vehicle" runat="server" AutoGenerateColumns="False" AllowSorting="true" PagerSettings-Position="TopAndBottom"
OnPageIndexChanging="GridView_Vehicle_PageIndexChanging" OnSorting="GridView_Vehicle_Sorting" PageSize="100"
GridLines="None" AllowPaging="true" CssClass="mGrid" PagerStyle-CssClass="pgr" AlternatingRowStyle-CssClass="alt">
<Columns> </Columns>
</asp:GridView>
<div style="height: 400px"></div>
</asp:Panel>
有什么建议吗?