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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:34:24+00:00 2026-06-14T05:34:24+00:00

I have a table, a datatable to be precise. Which is getting created, I

  • 0

I have a table, a datatable to be precise. Which is getting created, I have Computer Names in the first columns and prices on all the columns after. I am using the jquery plug in jquery.dataTables.editable and jquery.jeditable.

Here is a simple diagram to prove my point.

Column 1 | Column 2
--------------------
Apples   | 44%
--------------------
Bananas  | 23%
--------------------
Oranges  | 13%
--------------------
Other    | 10%
--------------------

The actual elements do not have a class associated with them. I need to get ONLY column 1 elements to have a class of “read_only”

This table is dynamically generated so it needs to happen in javascript.
This is what I was trying

$('tr').each(function(){
       if($("tr:first-child")){
           $(this).attr("class", "read_only");
       }
    });

This was in the $(document).read(function(){}, after I initialize my datatable.

Any suggestions on what I need to do?

  • 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-14T05:34:25+00:00Added an answer on June 14, 2026 at 5:34 am

    If you are using datatables it’s easy to add class during initialization like this:

    $('#example').dataTable( {
    "aoColumns":
     [
        { "sClass": "my_class" }, //class for the first column
        null,
        null     
     ]
     } );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one datatable. In that table I have columns named [Total Day], [Present
I have a DataTable which I want to save to a SQLite Database Table.
I have a strongly typed DataTable created with the VS2005/VS2008 DataSet designer. The table
i have a problem,,i try to make a table using datatable...i've been download from
i have a winform datagridview: DataTable table = new DataTable(); table.Columns.Add(Check, typeof(bool)); table.Columns.Add(User, typeof(string));
I have a table, generated from a LINQ query on a datatable, which has
I have a jquery datatable using the following code: // Test list table $('#dashboard_testlist_table').dataTable({
I have a table that I'm displaying using datatables. One of the columns in
I have table which contains columns like SiteID (identity_Col) SiteName POrderID Location Address Cluster
I have the below data table DataTable dtEquityHoldings = new DataTable(EquityHoldings); dtEquityHoldings.Columns.Add(EquityHoldings); dtEquityHoldings.Columns.Add(PortfolioWeight(%)); dtEquityHoldings.Columns.Add(MarketValue,

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.