Asp.net Gridview header [modified]
-
How can we freeze gridview header without using css or javascript?
modified on Saturday, February 7, 2009 12:11 AM
-
How can we freeze gridview header without using css or javascript?
modified on Saturday, February 7, 2009 12:11 AM
You could try prayer. Why would you ask how to do something, when you obviously already know what the tools are for doing it, but don't want to use them ?
Christian Graus Driven to the arms of OSX by Vista.
-
You could try prayer. Why would you ask how to do something, when you obviously already know what the tools are for doing it, but don't want to use them ?
Christian Graus Driven to the arms of OSX by Vista.
Thank you very much I ll try it. But here the problem is ,i ve to change culture. ie from english to arabic. Then css or javascript wont work properly. Thats why asked for any other method. I ll pray and if i am lucky i ll post answer in this site
-
Thank you very much I ll try it. But here the problem is ,i ve to change culture. ie from english to arabic. Then css or javascript wont work properly. Thats why asked for any other method. I ll pray and if i am lucky i ll post answer in this site
SreejithKumar M wrote:
Then css or javascript wont work properly.
Why not ? What makes you think that ?
Christian Graus Driven to the arms of OSX by Vista.
-
SreejithKumar M wrote:
Then css or javascript wont work properly.
Why not ? What makes you think that ?
Christian Graus Driven to the arms of OSX by Vista.
I tried this in css position:relative; top:expression(this.offsetParent.scrollTop-5); it is working in english but not in arabic language in arabic allignment direction is right to left here gridview header is scrolling
-
I tried this in css position:relative; top:expression(this.offsetParent.scrollTop-5); it is working in english but not in arabic language in arabic allignment direction is right to left here gridview header is scrolling
Hi, I got answer for this solution I changed <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> to <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> in design page Then i used follwing css /* Div container to wrap the datagrid */ div#div-datagrid { width: 420px; height: 200px; overflow: auto; scrollbar-base-color:#ffeaff; } /* Locks the left column */ td.locked, th.locked { font-size: 14px; font-weight: bold; text-align: center; background-color: navy; color: white; border-right: 1px solid silver; position:relative; cursor: default; left: expression(document.getElementById("div-datagrid").scrollLeft-2); /*IE5+ only*/ } /* Locks table header */ th { font-size: 14px; font-weight: bold; text-align: center; background-color: navy; color: white; border-right: 1px solid silver; position:relative; cursor: default; top: expression(document.getElementById("div-datagrid").scrollTop-2); /*IE5+ only*/ z-index: 10; } /* Keeps the header as the top most item. Important for top left item*/ th.locked {z-index: 99;} /* 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;} my aspx page is <div id="div-datagrid"> <asp:GridView ID="gv5" Width="100%" runat="server" BorderStyle="Solid" BorderColor="Navy" meta:resourcekey="gv5Resource1" UseAccessibleHeader="True"> <HeaderStyle BorderColor="Black" ForeColor="Black" BackColor="LightSkyBlue" /> <AlternatingRowStyle BackColor="Transparent" /> </asp:GridView> </div> like this
-
How can we freeze gridview header without using css or javascript?
modified on Saturday, February 7, 2009 12:11 AM
in aspx page add itemtemplet