I'm thankful for all help that you provided me with on this site, friends. There is one quite difficult thing I can't do, and I doubt it is possible for me.
THE TASK
Make first row and first column of an asp:Table constantly displayed on screen while the rest of the table is scrollable. By all means.
THE ENVIRONMENT
Asp.net, C#. No java script. No jQuery. But I'm ready to use everything that can help.
ASPX TABLE DECLARATION
The table is statically declared in aspx page. There is also another table. They are put into different asp:Views in asp:MultiView . Data is retrieved from SQL Server database in code-behind, cells and rows are created in code-behind.
<asp:Panel ID="pnlPanel1" runat="server" Visible="False" Enabled="False" Style="position: absolute; top: 57px; left: 0px; right: 0px; bottom: 0px; overflow: visible;">
<asp:MultiView ID="mvMultiView1" runat="server" ActiveViewIndex="0">
<asp:View ID="vView1" runat="server">
<div style="position: absolute; top: 22px; left: 90px; right: 0px; bottom: 0px; border: 0px #BAC7DB solid; border-right: none; background-color: #FFF; z-index: 98;">
<asp:Table ID="tblTable1" runat="server" CssClass="class_Schedule" GridLines="Both"/>
</asp:table>
</div>
</asp:View>
<asp:View ID="vView2" runat="server">
<div style="position: absolute; top: 22px; left: 90px; right: 0px; bottom: 0px; border: 0px #BAC7DB solid; border-right: none; background-color: #FFF; z-index: 98;">
<asp:Table ID="tblTable2" runat="server" CssClass="class_Schedule" GridLines="Both"/>
</asp:table>
</div>
</asp:View>
</asp:MultiView>
</asp:Panel>
SUGGESTIONS
If the problem can't be resolved with my current realization, I'm ready to learn other ways, including JavaScript.
Partially resolved. I put the header to a separate table that is on the top of main table. Main table is in a scrollable div, while the header table is in the top div and don't scroll. This allows vertical scrolling with the header row always on top.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.