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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:38:57+00:00 2026-05-31T07:38:57+00:00

I know that you can assign a class to the generated table by using

  • 0

I know that you can assign a class to the generated table by using CssClass on the RadioButtonList but I need to be able to style the generated <td>‘s individually.

Easy with JQuery but I’d much rather not have to resort to that.

Adding cssClass="myClass" to the ListItem results in the following broken HTML

<table id="myTable">
    <tbody>
        <tr>
            <td>
                <span cssclass="some_class"> // Well this is rubbish!
                    <input id="myRadioInput" type="radio" name="myRadioInput" value="myValue" >
                    <label for="myRadioInput">myLabel</label>
                </span>
            </td>
            <td>
                <input id="myRadioInput2" type="radio" name="myRadioInput2" value="myValue2">
                <label for="myRadioInput2">myLabel2</label>
            </td>
        </tr>
    </tbody>
</table>

So my question is: Is it actually posible to either assign a class or apply inline styling to the generated <td>‘s INDIVIDUALLY?

PLEASE NOTE
This is a question about ASP.NET. Answers that simply tell me how to style HTML elements are not answering the question.

  • 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-31T07:38:59+00:00Added an answer on May 31, 2026 at 7:38 am

    To style all the td’s you could add the CSS like so…

     #myTable td{
            color:Red;
        }
    

    Other than that (if you wanted different styles for each td) jQuery would be the only way to add classes to those generated td’s.

    $('#myTable td:eq(0)').addClass('td1');
    $('#myTable td:eq(1)').addClass('td2');
    ...
    

    OR

    $.each($('#myTable td'), function(i){
       $(this).addClass('td'+i);
    });
    

    This is one of the reasons I dislike ASP.NET controls with all the extra markup you have no control of through the properties panel.

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

Sidebar

Related Questions

I know that I can share files using Shared Folders in Virtual PC, but
I know that it's a subject that can raise a lot of debate, but
I know that JTable can sort by a single column. But is it possible
I know that I can insert multiple rows using a single statement, if I
I know that can co-exists with web form no problem as Hanselman mention here
I know that I can do something like $int = (int)99; //(int) has a
I know that you can insert multiple rows at once, is there a way
I know that you can use a dummy int parameter on operator++ and operator--
I know that you can run almost all Java in Dalvik's VM that you
I know that CSS can be used to control the presentation of (X)HTML in

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.