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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:07:21+00:00 2026-05-29T07:07:21+00:00

I’m using grid inside the grid. My scenario is in the outer grid in

  • 0

I’m using grid inside the grid. My scenario is in the outer grid in a row i have an Expand image as a first column. By clicking this an inner grid will be displayed. I did this and i got the result. But i’m facing allignment issue. Actually i have the same number of columns in both the grids. When i click the expand icon in a row, the inner grid is not alligned properly to the outer grid.
How to achive this.

The Format i need is like

  • Col1 Col2 Col3 Col4—————-Outer Grid
    _ Inner Grid Row1 —————————–Inner Grid Row1
    Value1_1 Value1_2 Value1_3————Inner Grid Row1 values
    Value2_1 Value2_2 Valuew_3
  • Inner Grid Row2
    _ Value1_1 Value1_2 Value1_3
    Value2_1 Value2_2 Valuew_3

Grid Allignment

How to allign like this.

Thanks In Advance!

  • 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-29T07:07:21+00:00Added an answer on May 29, 2026 at 7:07 am

    I’m assuming that the trouble you are facing is that even though you are using two different grids you would like the column widths to line up. If that’s correct you could use the method:

    DataGridViewColumn.GetPreferredWidth()
    

    This method is explained here on the MSDN.

    What you can do is either:

    1. Decide which grid is “in charge” of the width. Then get the preferred width of the column in the appropriate grid. Finally, set the width of the corresponding column in BOTH grids to the same width.
    2. Check the preferred width of the column in BOTH grids and compare them, taking the higher number as your new width. Then set both column widths to that number.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I have some data like this: 1 2 3 4 5 9 2 6
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

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.