hi
Please help me i want to fix a column in grid view i used style for locking the
column since i am setting the position as relative its not working properly
i have given my code below could any body fix this issue
[CODE=css]<style type="text/css">
/* Div container to wrap the datagrid */
div#div-datagrid
{
width: 700px;
overflow-x: auto;
overflow-y: hidden;
overflow: -moz-scrollbars-vertical;
scrollbar-base-color:#ffeaff;
}
/* Locks the left column */
td.locked, th.locked {
position:relati ve;
cursor: default;
/*IE5+ only*/
left: expression(docu ment.getElement ById("div-datagrid").scro llLeft-2);
}
/* DataGrid Item and AlternatingItem Style*/
.GridRow {font-size: 10pt; color: black; font-family: Arial;
background-color:#ffffff; height:35px;}
.GridAltRow {font-size: 10pt; color: black; font-family: Arial;
background-color:#eeeeee; height:35px;}</PRE>
</style>
<html>
<div id="div-datagrid" >
<asp:GridView ID="GridView1" PagerSettings-Visible="false" runat="server" CellPadding="4" ForeColor="#333 333"
AllowSorting="T rue" AutoGenerateCol umns="False" PageSize="7" AllowPaging="tr ue"
DataKeyNames="C lientId" OnRowDataBound= "GridView1_RowD ataBound" >
<AlternatingRow Style CssClass= "GridAltRow "/>
<RowStyle CssClass= "GridRow"/>
<Columns>
<asp:BoundFie ld DataField="Clie ntId" HeaderText="Cli entId" InsertVisible=" False"
ReadOnly="True" SortExpression= "ClientId" />
<asp:BoundFie ld DataField="Ente rpriseUserName" />
<column>
</DataGrid>
</Html>[/CODE]
and in code behind i called the rowbound event
protected void GridView1_RowDa taBound(object sender, GridViewRowEven tArgs e)
{
e.Row.Cells[0].CssClass = "locked";
}
Is there is any other solution Please
Please help me i want to fix a column in grid view i used style for locking the
column since i am setting the position as relative its not working properly
i have given my code below could any body fix this issue
[CODE=css]<style type="text/css">
/* Div container to wrap the datagrid */
div#div-datagrid
{
width: 700px;
overflow-x: auto;
overflow-y: hidden;
overflow: -moz-scrollbars-vertical;
scrollbar-base-color:#ffeaff;
}
/* Locks the left column */
td.locked, th.locked {
position:relati ve;
cursor: default;
/*IE5+ only*/
left: expression(docu ment.getElement ById("div-datagrid").scro llLeft-2);
}
/* DataGrid Item and AlternatingItem Style*/
.GridRow {font-size: 10pt; color: black; font-family: Arial;
background-color:#ffffff; height:35px;}
.GridAltRow {font-size: 10pt; color: black; font-family: Arial;
background-color:#eeeeee; height:35px;}</PRE>
</style>
<html>
<div id="div-datagrid" >
<asp:GridView ID="GridView1" PagerSettings-Visible="false" runat="server" CellPadding="4" ForeColor="#333 333"
AllowSorting="T rue" AutoGenerateCol umns="False" PageSize="7" AllowPaging="tr ue"
DataKeyNames="C lientId" OnRowDataBound= "GridView1_RowD ataBound" >
<AlternatingRow Style CssClass= "GridAltRow "/>
<RowStyle CssClass= "GridRow"/>
<Columns>
<asp:BoundFie ld DataField="Clie ntId" HeaderText="Cli entId" InsertVisible=" False"
ReadOnly="True" SortExpression= "ClientId" />
<asp:BoundFie ld DataField="Ente rpriseUserName" />
<column>
</DataGrid>
</Html>[/CODE]
and in code behind i called the rowbound event
protected void GridView1_RowDa taBound(object sender, GridViewRowEven tArgs e)
{
e.Row.Cells[0].CssClass = "locked";
}
Is there is any other solution Please
Comment