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 893613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:15:02+00:00 2026-05-15T14:15:02+00:00

I have never had an issue with putting th { background: #900; } as

  • 0

I have never had an issue with putting

th
{
    background: #900;
}

as a style in a css file and have that apply to the header row of an ASP datagrid.
But for some reason today, I have a grid that is getting output with everything in TBODY
and even the headers are in TD tags. Any ideas?

One thing that is a little different for me is this is bound to a List instead of to a DataTable. Is this a normal behavior? Easy way to fix?

UPDATE

<asp:DataGrid ID="dgEmployees" runat="server">   
</asp:DataGrid>

THE VALUE OF AN IDE
Okay, so my DataGrid should have been a GridView.
Teaches me to go and type in the tag by hand again.
Could not figure out what and the heck I had done wrong until I went and looked at an another project of mine.

  • 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-05-15T14:15:03+00:00Added an answer on May 15, 2026 at 2:15 pm

    CSS doesn’t care how you fill your datagrid. It could come from a datatable, a reader, a custom Object (employee, product, , etc). So it is not an issue because you are using a list instead of a datatable.

    You will need to post your CSS with your datagrid code.

    Here is an excellent link on how to use CSS with a datagrid / gridview:

    http://atashbahar.com/post/GridView-makeover-using-CSS.aspx

    Here is one specifically for datagrids:

    http://www.codeproject.com/KB/webforms/cssgrid.aspx

    I personally do not use datagrids, should be using grid view or some sort of repeater.

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

Sidebar

Related Questions

I have a basic cs-major understanding of multi-threading but have never had to do
OK, another road bump in my current project. I have never had form elements
As a mostly self-taught programmer, I have never really had anyone explain why certain
I have never worked with web services and rails, and obviously this is something
I have never hand-coded object creation code for SQL Server and foreign key decleration
I have never used octal numbers in my code nor come across any code
I have never seen a way to do this nicely, i would be interested
I have never really found the design view in Visual Studio useful when developing
i have never used LINQ in any of my projects , i have always
I have never used virtualization, and am trying to get up to speed. My

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.