473,473 Members | 2,303 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Gridview caption style

I am trying to figure out how to change the gridview caption style, but I
can not figure out how. I added

table caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
}

to my CSS, yet when the page renders, the grids style take precendence, as
it becomes an inline style.


Nov 19 '05 #1
6 24648
Tim,

Remove the in-line style. And set all the grid's styling with your style
sheet.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in message
news:OA**************@TK2MSFTNGP12.phx.gbl...
I am trying to figure out how to change the gridview caption style, but I
can not figure out how. I added

table caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
}

to my CSS, yet when the page renders, the grids style take precendence,
as it becomes an inline style.

Nov 19 '05 #2
Hmmmm, what I figured, but not an option that I cared for. IMHO the caption
style should be configurable through the skin OR the css. Looks like a
uh-uh, missed that one to me.

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:eZ**************@TK2MSFTNGP09.phx.gbl...
Tim,

Remove the in-line style. And set all the grid's styling with your style
sheet.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in
message news:OA**************@TK2MSFTNGP12.phx.gbl...
I am trying to figure out how to change the gridview caption style, but I
can not figure out how. I added

table caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
}

to my CSS, yet when the page renders, the grids style take precendence,
as it becomes an inline style.


Nov 19 '05 #3
Tim,

Don't rule it out yet. I'm hoping someone else who's used the new 2.0
version chimes in here.

I'm not positive that my suggestion is the only way to do this, but it's the
only way I know of so far...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
Hmmmm, what I figured, but not an option that I cared for. IMHO the
caption style should be configurable through the skin OR the css. Looks
like a uh-uh, missed that one to me.

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:eZ**************@TK2MSFTNGP09.phx.gbl...
Tim,

Remove the in-line style. And set all the grid's styling with your style
sheet.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in
message news:OA**************@TK2MSFTNGP12.phx.gbl...
I am trying to figure out how to change the gridview caption style, but I
can not figure out how. I added

table caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
}

to my CSS, yet when the page renders, the grids style take precendence,
as it becomes an inline style.



Nov 19 '05 #4
Actually, I figured out a compromise. Here is the gridview format in the skin file :

<asp:GridView runat="server" CssClass="tableView" CellPadding="1" AutoGenerateColumns="False" EmptyDataText="no data">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" CssClass=".tableFooter" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>

The gridview tag actually only sets the class name. Then in the css :

..tableView {
color:#333333;
border-collapse:separate;
white-space:nowrap;
}
..tableView caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
font-weight:bold;
}

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in message news:u5*************@TK2MSFTNGP14.phx.gbl...
Tim,

Don't rule it out yet. I'm hoping someone else who's used the new 2.0
version chimes in here.

I'm not positive that my suggestion is the only way to do this, but it's the
only way I know of so far...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
Hmmmm, what I figured, but not an option that I cared for. IMHO the
caption style should be configurable through the skin OR the css. Looks
like a uh-uh, missed that one to me.

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:eZ**************@TK2MSFTNGP09.phx.gbl...
Tim,

Remove the in-line style. And set all the grid's styling with your style
sheet.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in
message news:OA**************@TK2MSFTNGP12.phx.gbl...
I am trying to figure out how to change the gridview caption style, but I
can not figure out how. I added

table caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
}

to my CSS, yet when the page renders, the grids style take precendence,
as it becomes an inline style.





Nov 19 '05 #5
Tim,

Very cool. Thanks for letting us know.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Actually, I figured out a compromise. Here is the gridview format in the skin file :

<asp:GridView runat="server" CssClass="tableView" CellPadding="1" AutoGenerateColumns="False" EmptyDataText="no data">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" CssClass=".tableFooter" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>

The gridview tag actually only sets the class name. Then in the css :

.tableView {
color:#333333;
border-collapse:separate;
white-space:nowrap;
}
.tableView caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
font-weight:bold;
}

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in message news:u5*************@TK2MSFTNGP14.phx.gbl...
Tim,

Don't rule it out yet. I'm hoping someone else who's used the new 2.0
version chimes in here.

I'm not positive that my suggestion is the only way to do this, but it's the
only way I know of so far...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
Hmmmm, what I figured, but not an option that I cared for. IMHO the
caption style should be configurable through the skin OR the css. Looks
like a uh-uh, missed that one to me.

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:eZ**************@TK2MSFTNGP09.phx.gbl...
Tim,

Remove the in-line style. And set all the grid's styling with your style
sheet.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in
message news:OA**************@TK2MSFTNGP12.phx.gbl...
I am trying to figure out how to change the gridview caption style, but I
can not figure out how. I added

table caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
}

to my CSS, yet when the page renders, the grids style take precendence,
as it becomes an inline style.





Nov 19 '05 #6
Actually, I converted all of the styles to css classes because of the fact that the styles generated from the skin become inline styles in the grid output, really bloating the size of the grid html output.Thus I would only control the class name from the skin file. Here is my changes :

SKIN FILE:
<asp:GridView runat="server" CssClass="tableView" GridLines="None" AutoGenerateColumns="False" EmptyDataText="no data">
<HeaderStyle CssClass="tableViewHeader" />
<FooterStyle CssClass="tableViewFooter" />
<RowStyle CssClass="tableViewRow" />
<EditRowStyle CssClass="tableViewEditRow" />
<SelectedRowStyle CssClass="tableViewSelectedRow" />
<PagerStyle CssClass="tableViewPager" />
<AlternatingRowStyle CssClass="tableViewAlternatingRow" />
</asp:GridView>

CSS:

..tableView {
color:#333333;
border-collapse:collapse;
white-space:nowrap;
}
..tableView caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
font-weight:bold;
}
..tableView td{
padding-right: 3px;
white-space:nowrap;
}
..tableViewHeader, .tableViewFooter{
background-color:#5D7B9D;
color:White;
font-weight:bold;
}
..tableViewRow{
background-color:#F7F6F3;
color:#333333;
}
..tableViewEditRow{
background-color:#999999;
}
..tableViewSelectedRow{
background-color:#E2DED6;
font-weight:bold;
color:#333333;
}
..tableViewPager{
background-color:#284775;
color:White;
text-align:center;
}
..tableViewAlternatingRow{
background-color:White;
color:#284775;
}
"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in message news:eK**************@tk2msftngp13.phx.gbl...
Tim,

Very cool. Thanks for letting us know.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in message news:%2****************@tk2msftngp13.phx.gbl...
Actually, I figured out a compromise. Here is the gridview format in the skin file :

<asp:GridView runat="server" CssClass="tableView" CellPadding="1" AutoGenerateColumns="False" EmptyDataText="no data">
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" CssClass=".tableFooter" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<EditRowStyle BackColor="#999999" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>

The gridview tag actually only sets the class name. Then in the css :

.tableView {
color:#333333;
border-collapse:separate;
white-space:nowrap;
}
.tableView caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
font-weight:bold;
}

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in message news:u5*************@TK2MSFTNGP14.phx.gbl...
Tim,

Don't rule it out yet. I'm hoping someone else who's used the new 2.0
version chimes in here.

I'm not positive that my suggestion is the only way to do this, but it's the
only way I know of so far...

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
Hmmmm, what I figured, but not an option that I cared for. IMHO the
caption style should be configurable through the skin OR the css. Looks
like a uh-uh, missed that one to me.

"S. Justin Gengo" <justin@[no_spam_please]aboutfortunate.com> wrote in
message news:eZ**************@TK2MSFTNGP09.phx.gbl...
Tim,

Remove the in-line style. And set all the grid's styling with your style
sheet.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Tim Cartwright" <ti************@nospam.us-interactive.com> wrote in
message news:OA**************@TK2MSFTNGP12.phx.gbl...
I am trying to figure out how to change the gridview caption style, but I
can not figure out how. I added

table caption {
background-color: #5D7B9D;
color: White;
font-size: 16pt;
}

to my CSS, yet when the page renders, the grids style take precendence,
as it becomes an inline style.





Nov 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Randall Sell | last post by:
Can anyone confirm if I am being an idiot, or is this a bug in the CSS implementation of Netscape 7.x/Mozilla 1.4 ... give the following single HTML: <html> <head> <style type="text/css">...
1
by: msch-prv | last post by:
I have difficulties adjusting the column width of a gridview control. The column width changes appear in the design grid, but at run-time the width changes back to what I presume are the grid's...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
11
by: Chris Beall | last post by:
See http://pages.prodigy.net/chris_beall/Demo/photo%20block%20experiments.html I've ended up with what seems like a rather complex structure for what I thought would be a somewhat simple...
9
by: Neal | last post by:
http://www.brassattackofspringfield.com/gigs.html CSS at http://www.brassattackofspringfield.com/default.css Opera and IE render caption as desired. Firefox does not. Why? And is there a fix?
4
by: =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?= | last post by:
I setup a simple gridview as a utility just to do some updates, nothing fancy just wanted easy UI to make updates. When I select ‘Edit’, I get the fields I want to edit. I edit them and click...
0
by: Andy B | last post by:
I have the following gridview. There are 2 other textBoxes and a button on the page as well. When somebody puts text into the 2 textBoxes and presses the add button, it puts the values of those...
1
by: Bogdan | last post by:
Hi, Is there a way to apply a style to a gridview caption text? I've used styles for header, footer, row, etc. I can't find anything obvious for the caption. Thanks, Bogdan
0
by: vinothrao84 | last post by:
Hi, i have the below gridview code in my asp.net c# page. Problem is i having an error saying that "A field or property with the name 'ProfileID, Image' was not found on the selected data...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.