Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9106451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:20:40+00:00 2026-06-17T02:20:40+00:00

I have a datagrid in my screen display, defined as follows:- <div style=overflow: auto;

  • 0

I have a datagrid in my screen display, defined as follows:-

<div style="overflow: auto; width: 380px; height: 300px">
    <asp:DataGrid id="ItemsGrid"
                  BorderWidth="1"
                  CellPadding="3"
                  AutoGenerateColumns="true"
                  runat="server">
        <HeaderStyle CssClass="subHeader"></HeaderStyle>
        <ItemStyle CssClass="normalText"></ItemStyle >
    </asp:DataGrid>
</div>

This is displayed like this:-

Display with HeaderStyle

Without the HeaderStyle item the grid is displayed as I would expect:-

Display without HeaderStyle

(although the titles are styled wrongly). The CSS is thus:-

.subHeader
{
    clear:both;
    float: left;
    display: block;
    overflow: hidden;
    margin: 0;
    border: 0;
    border-width: 0px;
    border-right-style: solid;
    font-size: small;
    font-family: Verdana;
}

Does anyone know what I am doing wrong here? I have tried the suggestion here but it doesn’t make any difference.

Edit

As requested here is the HTML output, first for the version with the HeaderStyle entry:-

<div style="overflow: auto; width: 380px; height: 300px">
    <table cellspacing="0" cellpadding="3" rules="all" border="1" id="ItemsGrid style="border-width:1px;border-style:solid;border-collapse:collapse;">
    <tr class="subHeader">
        <td>Grade</td><td>Kurznamen</td><td>Discard&nbsp;Length</td>
    </tr><tr class="normalText">
        <td>13004</td><td>21CRNIMO2-2-2</td><td>23.17</td>

and without:-

                       <div style="overflow: auto; width: 380px; height: 300px">
                            <table cellspacing="0" cellpadding="3" rules="all" border="1" id="ItemsGrid" style="border-width:1px;border-style:solid;border-collapse:collapse;">
<tr>
    <td>Grade</td><td>Kurznamen</td><td>Discard&nbsp;Length</td>
</tr><tr class="normalText">
    <td>13004</td><td>21CRNIMO2-2-2</td><td>23.17</td>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T02:20:42+00:00Added an answer on June 17, 2026 at 2:20 am

    Remove the clear and float rules and you should be good to go.

    Also, in case you are not faimiliar with CSS, I recommend you to take a look on some sites like this: http://www.csstutorial.net/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have DataGrid and I set: CellStyle={StaticResource Style} My style: <Style x:Key=Style TargetType={x:Type tool:DataGridCell}
I have a datagrid that occupies 100% of browser screen. I want the grid
I have datagrid whichs items source is domainDataSource. How i can refresh Domain data
I have a datagrid in C#.net I have made some columns in grid editable.
I have a DataGrid with a CheckBox column. I show a popup if the
I have a DataGrid in WPF bound to an observable collection. In my UI
I have a DataGrid Shipments and Products. The shipments are always shown, and the
I have a DataGrid that represents layers - each row is an image on
I have a datagrid view which is editable. I'm getting the value of a
I have a datagrid and I want to set the value of a dropdownlist

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.