Problem setting Header Image in GridView Control
-
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
-
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
-
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.
I tested with various browsers....IE,Mozila,Chrome but the result is the same
CC26
-
I tested with various browsers....IE,Mozila,Chrome but the result is the same
CC26
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[^]
-
I tested with various browsers....IE,Mozila,Chrome but the result is the same
CC26
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.
-
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
-
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.
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
-
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.
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
-
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
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.