Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   GridView working with External Stylesheet and CssClass (http://www.velocityreviews.com/forums/t700240-gridview-working-with-external-stylesheet-and-cssclass.html)

JB 10-02-2009 11:11 PM

GridView working with External Stylesheet and CssClass
 
Hello

I have an external style sheet in my web application. But I want need
fixed headers on my GridView and scroll through the GridView data.

I can do it when I put the following code Style within the <head> </head>:

.header
{
font-weight:bold;
position:absolute;
background-color:White;

}

and put the following in my <HeaderStyle> in my GridView:

<HeaderStyle CssClass="header" Height="20px" />

and lastly comment out my external stylesheet the GridView Header will be
fixed and I can scroll thru the GridView.

The problem is that I need the External stylesheet because I have to
position the GridView on the web page and I have to position all of the other
controls on the web page using the External stylesheet.

I cannot get rid of the external stylesheet is there any work-around that I
can still utilize the style declarations with my external stylesheet?

JB





--
JB

Patrice 10-03-2009 12:29 PM

Re: GridView working with External Stylesheet and CssClass
 
My understanding is that this style doesn't work when you apply your
external stylesheet so you have likely a conflict with other styles declared
in this stylesheet. You could use a tool to find out the conflicting style
(firebug or IE developer tollbar and inspect the style applied to the
header).

--
Patrice

"JB" <JB@discussions.microsoft.com> a écrit dans le message de
news:10E4CE5B-68C0-4365-B43F-6BD452029151@microsoft.com...
> Hello
>
> I have an external style sheet in my web application. But I want need
> fixed headers on my GridView and scroll through the GridView data.
>
> I can do it when I put the following code Style within the <head>
> </head>:
>
> .header
> {
> font-weight:bold;
> position:absolute;
> background-color:White;
>
> }
>
> and put the following in my <HeaderStyle> in my GridView:
>
> <HeaderStyle CssClass="header" Height="20px" />
>
> and lastly comment out my external stylesheet the GridView Header will be
> fixed and I can scroll thru the GridView.
>
> The problem is that I need the External stylesheet because I have to
> position the GridView on the web page and I have to position all of the
> other
> controls on the web page using the External stylesheet.
>
> I cannot get rid of the external stylesheet is there any work-around that
> I
> can still utilize the style declarations with my external stylesheet?
>
> JB
>
>
>
>
>
> --
> JB



Phil Harvey 10-03-2009 06:57 PM

RE: GridView working with External Stylesheet and CssClass
 
Hi JB,

The Height property on HeaderStyle renders a style attribute on the table
row, like this:

<tr class="header" style="height:20px;">

Because you've also specified a CSS class, just add "height: 20px;" to the
header CSS class in your external stylesheet and delete the Height property
from the GridView HeaderStyle properties. This should achieve what you want.

Regards,

-------------
Phil Harvey
www.anotherblog.com


"JB" wrote:

> Hello
>
> I have an external style sheet in my web application. But I want need
> fixed headers on my GridView and scroll through the GridView data.
>
> I can do it when I put the following code Style within the <head> </head>:
>
> .header
> {
> font-weight:bold;
> position:absolute;
> background-color:White;
>
> }
>
> and put the following in my <HeaderStyle> in my GridView:
>
> <HeaderStyle CssClass="header" Height="20px" />
>
> and lastly comment out my external stylesheet the GridView Header will be
> fixed and I can scroll thru the GridView.
>
> The problem is that I need the External stylesheet because I have to
> position the GridView on the web page and I have to position all of the other
> controls on the web page using the External stylesheet.
>
> I cannot get rid of the external stylesheet is there any work-around that I
> can still utilize the style declarations with my external stylesheet?
>
> JB
>
>
>
>
>
> --
> JB



All times are GMT. The time now is 02:30 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57