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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Problem setting Header Image in GridView Control

Problem setting Header Image in GridView Control

Scheduled Pinned Locked Moved ASP.NET
cssdesignhelp
9 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.
  • C Offline
    C Offline
    CrazyCoder26
    wrote on last edited by
    #1

    Hi I have a css class .gridHeader { background-image:url('images/hdr.gif'); } now I have set the "HeaderStyle-CssClass" property of Gridview to "gridHeader". In design view the header image comes properly.But when I browse the page in browser the header image disappears.

    CC26

    S 2 Replies Last reply
    0
    • C CrazyCoder26

      Hi I have a css class .gridHeader { background-image:url('images/hdr.gif'); } now I have set the "HeaderStyle-CssClass" property of Gridview to "gridHeader". In design view the header image comes properly.But when I browse the page in browser the header image disappears.

      CC26

      S Offline
      S Offline
      sashidhar
      wrote on last edited by
      #2

      Its may be due to the browser..! Delete history cache and all the files in the browser and try again..! If you still have the problem let me know..!

      LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

      C 1 Reply Last reply
      0
      • S sashidhar

        Its may be due to the browser..! Delete history cache and all the files in the browser and try again..! If you still have the problem let me know..!

        LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

        C Offline
        C Offline
        CrazyCoder26
        wrote on last edited by
        #3

        I tested with various browsers....IE,Mozila,Chrome but the result is the same

        CC26

        P S 2 Replies Last reply
        0
        • C CrazyCoder26

          I tested with various browsers....IE,Mozila,Chrome but the result is the same

          CC26

          P Offline
          P Offline
          Petr Pechovic
          wrote on last edited by
          #4

          Hi, almost every browser has a developer tool. Use it to track the images, css and stuff like that.

          Petr Pechovic my latest articles: Web Page Loading in Steps - ASP.NET Solution[^] Buttons, Message Box and Confirm Box in ASP.NET 3.5[^]

          1 Reply Last reply
          0
          • C CrazyCoder26

            I tested with various browsers....IE,Mozila,Chrome but the result is the same

            CC26

            S Offline
            S Offline
            sashidhar
            wrote on last edited by
            #5

            where is your css file..! If it is in the root ..!then it should work if it is in the folder lets say its in

            App_Themes/Theme1/StyleSheet.css

            then You have to give

            background-image:url(../../images/button4.gif);

            depending on the folder..! one../ should be used..! if you still has the problem as petr suggests open it in browser and view page source..! and check the image

            LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

            C 1 Reply Last reply
            0
            • C CrazyCoder26

              Hi I have a css class .gridHeader { background-image:url('images/hdr.gif'); } now I have set the "HeaderStyle-CssClass" property of Gridview to "gridHeader". In design view the header image comes properly.But when I browse the page in browser the header image disappears.

              CC26

              S Offline
              S Offline
              sashidhar
              wrote on last edited by
              #6

              I tried just now its working good..! First for me also didnt waork i deleted all the cache objects and it worked now..!

              LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

              C 1 Reply Last reply
              0
              • S sashidhar

                where is your css file..! If it is in the root ..!then it should work if it is in the folder lets say its in

                App_Themes/Theme1/StyleSheet.css

                then You have to give

                background-image:url(../../images/button4.gif);

                depending on the folder..! one../ should be used..! if you still has the problem as petr suggests open it in browser and view page source..! and check the image

                LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

                C Offline
                C Offline
                CrazyCoder26
                wrote on last edited by
                #7

                THE CSS file is in the root only. The browser page source for gridview header row is given below.it seems ok only. <table cellspacing="0" cellpadding="4" rules="cols" border="1" id="ctl00_ContentPlaceHolder1_grdSoData" style="color:#333333;font-family:Times New Roman,Arial;font-size:Small;border-collapse:collapse;">                <b><tr class="gridHeader"></b>                    <th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN1')" style="color:#333333;">COLUMN1</a></th> <th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN2')" style="color:#333333;">COLUMN1</a></th> <tr> I have cleared the browser cache also.But nothing worked.

                CC26

                1 Reply Last reply
                0
                • S sashidhar

                  I tried just now its working good..! First for me also didnt waork i deleted all the cache objects and it worked now..!

                  LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

                  C Offline
                  C Offline
                  CrazyCoder26
                  wrote on last edited by
                  #8

                  THE CSS file is in the root only. The browser page source for gridview header row is given below.it seems ok only. <table cellspacing="0" cellpadding="4" rules="cols" border="1" id="ctl00_ContentPlaceHolder1_grdSoData" style="color:#333333;font-family:Times New Roman,Arial;font-size:Small;border-collapse:collapse;">                      <b><tr class="gridHeader"></b>                              <th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN1')" style="color:#333333;">COLUMN1</a></th> <th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN2')" style="color:#333333;">COLUMN1</a></th> <tr> I have cleared the browser cache also.But nothing worked.

                  CC26

                  S 1 Reply Last reply
                  0
                  • C CrazyCoder26

                    THE CSS file is in the root only. The browser page source for gridview header row is given below.it seems ok only. <table cellspacing="0" cellpadding="4" rules="cols" border="1" id="ctl00_ContentPlaceHolder1_grdSoData" style="color:#333333;font-family:Times New Roman,Arial;font-size:Small;border-collapse:collapse;">                      <b><tr class="gridHeader"></b>                              <th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN1')" style="color:#333333;">COLUMN1</a></th> <th scope="col"><a href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$grdSoData','Sort$COLUMN2')" style="color:#333333;">COLUMN1</a></th> <tr> I have cleared the browser cache also.But nothing worked.

                    CC26

                    S Offline
                    S Offline
                    sashidhar
                    wrote on last edited by
                    #9

                    Sorry to respond late ...! I was not in office yaesterday..! here the sample project follow tht and if you have any doubts fell free to ask..! http://www.4shared.com/file/165813014/8a396318/sashi.html[^]

                    LatestArticle :Log4Net Why Do Some People Forget To Mark as Answer .If It Helps.

                    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