0

I Have Page That Have GridView This GridView Have a Lot Of Rows my clients Want To Freeze The Fisrt column and curresponding header, and I tried below code

CSS

div#div-datagrid 
{
/*style="height: 382px; overflow: scroll; width: 100%"*/
width:  100%;
height: 382px;
overflow: scroll;
/*scrollbar-base-color:#ffeaff;*/
}

/* Locks the left column */
td.locked, th.locked {
position:relative;
cursor: default;
background-color: White;
/*IE5+ only*/
left:expression(document.getElementById("div-datagrid").scrollLeft-2);
}

.CS

protected void myGrid_RowDataBound(object sender, GridViewRowEventArgs e)
{
e.Row.Cells[0].CssClass = "locked";
e.Row.Cells[1].CssClass = "locked";
}

This is working fine in IE but not working in FF and Chrome. Any Solution?

4

0 回答 0