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

  • Home
  • SEARCH
  • 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

This is very odd. I have never had this issue with ShowDialog in C#.
Ok I have this problem that I've never had before, it's really bugging me.
Here is a question that I have had for some time but never actually
There is a component that I have been using since IE7 and had never
So i have never really had issues with the File Browser Plugin before but
I have used this query on many occasions and never had an issue. I
I started coding in C# and have never had the opportunity to use callbacks
For years, on 32-bit systems I have never had a problem. Why can't I
i've been programming for a while, but have never had a formal computer science
I am amateur programmer learning how to program. I have never had any computer

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.