Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > HeaderStyle - How to align differently then rest of gird

Reply
Thread Tools

HeaderStyle - How to align differently then rest of gird

 
 
RGB
Guest
Posts: n/a
 
      01-07-2005
I am creating a datagrid. I need for the header to align closer to the
bottom of the grid row then then the rest of the data in the grid. I have
tried using HeaderStyle and putting a style of padding-bottom, setting it to
a negative number, but that doesn't seem to have an affect on the look. The
padding for the grid itself is 4px, but I need the header to have NO padding.

Any ideas?

Here is the code (keep in mind it is using style sheets where I am changing
the padding-bottom to no avail!):

<aspataGrid Width="100%" id="companyGrid" runat="server"
AutoGenerateColumns="False" CssClass="reporttype highlight" GridLines="None"
style="MARGIN-BOTTOM: 0px">
<AlternatingItemStyle CssClass="greyBkg"></AlternatingItemStyle>
<HeaderStyle CssClass="reporttypeheader"></HeaderStyle>
<Columns>
<cc:RowSelectorColumn HeaderText="COMPANY NAME" SelectionMode="Single">
<ItemStyle Width="40px" CssClass="leftcolumn"></ItemStyle>
</cc:RowSelectorColumn>
<asp:BoundColumn DataField="CompanyName"></asp:BoundColumn>
<asp:BoundColumn Visible="False" DataField="CompanyGUID"></asp:BoundColumn>
</Columns>
</aspataGrid>
 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      01-07-2005
"RGB" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am creating a datagrid. I need for the header to align closer to the
> bottom of the grid row then then the rest of the data in the grid. I have
> tried using HeaderStyle and putting a style of padding-bottom, setting it
> to
> a negative number, but that doesn't seem to have an affect on the look.
> The
> padding for the grid itself is 4px, but I need the header to have NO
> padding.
>
> Any ideas?
>
> Here is the code (keep in mind it is using style sheets where I am
> changing
> the padding-bottom to no avail!):


If you add bottom padding does the alignment get worse? Try adding something
silly like 20px and see what happens.

John Saunders


 
Reply With Quote
 
 
 
 
RGB
Guest
Posts: n/a
 
      01-07-2005
I actually have already done that. First I wanted to make sure it was using
the style that I thought it was, so I made the font ridiculously large. Then
I made the padding ridiculously large as well and the right and left padding
worked, but not the bottom or top. I used "padding:" and set the top, right,
bottom, left. I also used "padding-bottom" and that didn't work either, but
that doesn't work for right or left either.

"John Saunders" wrote:

> "RGB" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I am creating a datagrid. I need for the header to align closer to the
> > bottom of the grid row then then the rest of the data in the grid. I have
> > tried using HeaderStyle and putting a style of padding-bottom, setting it
> > to
> > a negative number, but that doesn't seem to have an affect on the look.
> > The
> > padding for the grid itself is 4px, but I need the header to have NO
> > padding.
> >
> > Any ideas?
> >
> > Here is the code (keep in mind it is using style sheets where I am
> > changing
> > the padding-bottom to no avail!):

>
> If you add bottom padding does the alignment get worse? Try adding something
> silly like 20px and see what happens.
>
> John Saunders
>
>
>

 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      01-07-2005
"RGB" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I actually have already done that. First I wanted to make sure it was
>using
> the style that I thought it was, so I made the font ridiculously large.
> Then
> I made the padding ridiculously large as well and the right and left
> padding
> worked, but not the bottom or top. I used "padding:" and set the top,
> right,
> bottom, left. I also used "padding-bottom" and that didn't work either,
> but
> that doesn't work for right or left either.


I don't know. I'm not an HTML expert. I'd play with margin and with
cellpadding and cellspacing as well. In fact, I'd experiment on this on a
normal <table> until I got it right, then I'd go apply it to the DataGrid.

John Saunders


 
Reply With Quote
 
RGB
Guest
Posts: n/a
 
      01-07-2005
The style works fine outside of the datagrid. I can get the bottom padding
to change for the entire grid, but can't get only the heading to change it's
padding.

"John Saunders" wrote:

> "RGB" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> >I actually have already done that. First I wanted to make sure it was
> >using
> > the style that I thought it was, so I made the font ridiculously large.
> > Then
> > I made the padding ridiculously large as well and the right and left
> > padding
> > worked, but not the bottom or top. I used "padding:" and set the top,
> > right,
> > bottom, left. I also used "padding-bottom" and that didn't work either,
> > but
> > that doesn't work for right or left either.

>
> I don't know. I'm not an HTML expert. I'd play with margin and with
> cellpadding and cellspacing as well. In fact, I'd experiment on this on a
> normal <table> until I got it right, then I'd go apply it to the DataGrid.
>
> John Saunders
>
>
>

 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      01-07-2005
"RGB" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The style works fine outside of the datagrid. I can get the bottom
> padding
> to change for the entire grid, but can't get only the heading to change
> it's
> padding.


When you say that it works outside of the grid, do you mean that it works in
a table?

Have you looked at the HTML generated by the DataGrid for a clue? In
particular, can you get the style to work on a table similar to the one that
the DataGrid generates?

John Saunders


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Gird Your Blogs! Dave U. Random Computer Support 4 04-21-2009 02:17 AM
hiding columns in gird based on column values news.microsoft.com ASP .Net 2 10-25-2007 09:49 AM
Help. SessionID is x then y then x then y BodiKlamph@gmail.com ASP General 0 09-03-2005 03:02 PM
Does ASP.NET treat <header> differently than the rest of the html? aleko ASP .Net 0 02-25-2005 09:35 PM



Advertisments