Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Asp.net Gridview header [modified]

Asp.net Gridview header [modified]

Scheduled Pinned Locked Moved ASP.NET
csharpjavascriptcssasp-netquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    SreejithKumar M
    wrote on last edited by
    #1

    How can we freeze gridview header without using css or javascript?

    modified on Saturday, February 7, 2009 12:11 AM

    C V 2 Replies Last reply
    0
    • S SreejithKumar M

      How can we freeze gridview header without using css or javascript?

      modified on Saturday, February 7, 2009 12:11 AM

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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.

      S 1 Reply Last reply
      0
      • C Christian Graus

        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.

        S Offline
        S Offline
        SreejithKumar M
        wrote on last edited by
        #3

        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

        C 1 Reply Last reply
        0
        • S SreejithKumar M

          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

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          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.

          S 1 Reply Last reply
          0
          • C Christian Graus

            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.

            S Offline
            S Offline
            SreejithKumar M
            wrote on last edited by
            #5

            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

            S 1 Reply Last reply
            0
            • S SreejithKumar M

              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

              S Offline
              S Offline
              SreejithKumar M
              wrote on last edited by
              #6

              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

              1 Reply Last reply
              0
              • S SreejithKumar M

                How can we freeze gridview header without using css or javascript?

                modified on Saturday, February 7, 2009 12:11 AM

                V Offline
                V Offline
                varma suresh
                wrote on last edited by
                #7

                in aspx page add itemtemplet

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups