Voila une partie de mes codes:
CSS:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| div#tblContainer {
width: 1000px;
height: 610px;
overflow: auto;
scrollbar-base-color:#E0E0E0 ;
}
thead th {
top: expression(document.getElementById("tblContainer").scrollTop-2); /* IE5+ only */
z-index: 20;
}
td.headerlocked, th.headerlocked{
background-color: #507CD1;
font-weight: bold;
Font-Family:Verdana;
Font-Size:x-small;
color:white;
left: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft); /* IE5+ only */
position: relative;
z-index: 10;
} |
ASPX
1 2
| <div id="tblContainer">
<asp:GridView ID="GridView" runat="server"> |
Le tout rempli de TextBox
JS
document.getElementById('ctl00_Main_GridView_ctl25_TotalItem').innerText = newTotalGeneral;
CS
1 2 3 4 5 6 7
| protected void GridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
//rename the header with the months/year data
if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[0].CssClass = "headerlocked"; |
C'est juste un apercu... , lorsque JS est appelé le Datagrid s'affiche entièrement et n'applique plus le CSS 
Merci pour tout aide
Partager