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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:43:23+00:00 2026-05-13T23:43:23+00:00

How can I get several GridViews on a single page to share the same

  • 0

How can I get several GridViews on a single page to share the same Column widths?

I have four GridViews with (essentially) the same columns in each. They have unique headers and represent data from different queries. I want to maximize readability by allowing the columns to be dynamically sized based on the data but I don’t want each GridView to do it independently. Having same-named columns one above the other with different widths looks very sloppy. Instead want all four GridViews to choose the same size for column 1, the same size for column 2, etc.

In windows apps I believe there is a property for this called SharedSizeGroup which allows you to set columns from different controls to collaborate when deciding on the optimum size.

Can this be achieved at all in ASP.NET? Is it just too much to ask because the dynamic column widths are up to the browser?

Thanks

  • 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-13T23:43:24+00:00Added an answer on May 13, 2026 at 11:43 pm

    Is it just too much to ask because the dynamic column widths are up to the browser?

    Pretty much. Unless you explictly set the column width, the browser will choose – so ASP.NET has no knowledge of it. You could probably use some jQuery to compensate though:

    $(function() {
       var maxWidth = 0;
       $('TBODY TR:first TD.col1').each(function() {
           maxWidth = $(this).width > maxWidth ? $(this).width : maxWidth;
       });
    
       $('TBODY TR:first TD.col1').width(maxWidth);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a view that can take several seconds to process a GET request
I have a canvas, on this canvas there are several elements. I can get
Can someone please let me know how to get values from several input fields?
I have been trying to get this to work and can't. I have a
Link to page: http://www.northtreestudios.com/sandbox/ Wondering how I can get the background images of my
I want to get and use Page ID in several php files. However I
I have several resources in my iPhone app and when they get compiled they
Suppose I have a Singleton class (any class can get the instance): class data
Suppose I have an object in PHP $o, about which I can get $o->a->b,
I have a Java project using m2eclipse. In my Eclipse, I get several Warnings.

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.