Hi,
I Have Page That Have GridView This GridView Have a Lot Of Rows my clients Want To Freeze The Fisrt column and curresponding header(For Horizontal scroll), 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
protectedvoid myGrid_RowDataBound(object sender,GridViewRowEventArgs e){ e.Row.Cells[0].CssClass="locked"; e.Row.Cells[1].CssClass="locked";}
ASPX
<div id="div-datagrid" >
<asp:GridView ID="grdOraganization" runat="server" CellPadding="0" EmptyDataText="No Records Found"
CssClass="GridView" OnRowDataBound="grdOraganization_RowDataBound" DataKeyNames="EmpCode">
<RowStyle CssClass="GridViewRow" HorizontalAlign="Left" Height="20px" />
<EmptyDataRowStyle CssClass="EmptyDataRow" />
<HeaderStyle HorizontalAlign="Left" Font-Bold="False" />
<AlternatingRowStyle CssClass="GridViewAlternateStyle" />
</asp:GridView>
</div>
any help highly appriciated :)