how to fix header of table with repeater controll with vertical scroll?

saatan

New Member
I have to fix header of table when i scroll down i want to see column header till the end of records. i made this but i am facing a problem. i fetch data from database that's a dynamic data so when i display that in table the layout gets odd. because if there is a column with more than 1000 words that will change its width while i mention table cell width with percentage. how i can solve this problem that header remain on the top and the layout will not be disturbed what ever data is. i do not want to use jQuery\[code\].gridScrollDiv{border:1px solid #CCCCCC;height: 500px;overflow: scroll;overflow-x: hidden;}<div class="gridScrollDiv"> <table id="tblData" class="grid" style="width: 100%;" cellpadding="0"> <thead style="position:absolute;"> <tr> <th style="width:40%;"> Code </th> <th style="width:40%;"> Description </th> <th style="width:20%;"> Date </th> </tr> </thead> <tbody> <asp:Repeater ID="rptLoation" runat="server"> <ItemTemplate> <tr> <td style="width:40%; word-wrap:breake-word;"> <%# DataBinder.Eval(Container.DataItem, "Code")%> </td> <td style="width:40%; word-wrap:breake-word;"> <%# DataBinder.Eval(Container.DataItem, "Description")%> </td> <td style="width:20%; word-wrap:breake-word;"> <%# DataBinder.Eval(Container.DataItem, "RegistrationDate")%> </td> </tr> </ItemTemplate> </asp:Repeater> </tbody> </table></div>\[/code\]
 
Top