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

The Archive Base Latest Questions

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

Technology: Visual Studio 2010, Asp.Net 4.0 I have several tables vertically aligned over each

  • 0

Technology: Visual Studio 2010, Asp.Net 4.0

I have several tables vertically aligned over each other. They are created dynamically in codebehind. I would like to make the first column the same width for each table based on the longest text from first column. there is know width set initially because the cell needs to resize dynamically to content.

Note: the first column(td) of each table row has a label.

So for example:

Table1 (first column)
1
12

Table2 (first column)
123
1234

The longest width would be the cell that contains [1234]. Now I would like to set the first column cells of the other tables to that width.

Here is a basic layout. FIDDLE
Of course this doesn’t show how it is created dynamically but the general jist of it.

  • 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-17T17:22:42+00:00Added an answer on June 17, 2026 at 5:22 pm

    You can iterate through td and use text() function to find the count of characters and filter out the td with maximum number of characters.

    Live Demo

    var maxlen=0;
    var tdLongest;
    $('table td').each(function(){
        if($(this).text().length > maxlen)
        {
            maxlen = $(this).text().length;
            tdLongest = $(this);
        }
    });
    alert(tdLongest.text());
    alert(tdLongest.width());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Technology: .NET 4, C#, WinForms, Visual Studio 2010 I have run into an issue
Technology: Visual Studio 2008 .NET, Winforms bsTransactions.DataSource = Transactions.Tables[2]; bsnTransactions.BindingSource = bsTransactions; txtTransOverrideDate.DataBindings.Add(Text, bsTransactions,
As you know IntelliTrace technology just available on Visual Studio 2010 Ultimate version, and
Technology Used:- Asp.Net 2.0 Code:- See Below Description:- hello code given below is working
I'm debating what technology to use for an upcoming ASP.NET project. Assumptions: I will
open Visual Studio 2010. Click File->New->Web Site... In the dialog window that opens, select
I have a MS Office COM addin written in C# (Visual Studio 2005) and
I was reading this article Build Your First Cloud Application Using Visual Studio 2010
I am using Visual Studio 2010 SP1 with MVC3 Tools Update, and EF 4.1
I'm coding an Outlook 2010 plug-in in .NET 4.0, which use WPF technology, and

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.