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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:53:48+00:00 2026-05-13T10:53:48+00:00

I have a datagrid contained in a vbox, this datagrid acts as a spreadsheet

  • 0

I have a datagrid contained in a vbox, this datagrid acts as a spreadsheet it contains 70 columns, initially 10 are visible and the rest are hidden and the user selects which other colums to show dynamically.
I need this datagrid to use the maximum screen width available, so I have set the application’s width to 100% as well as the vbox and the datagrid, I also set the horizontalscrollpolicy of the datagrid to “auto” so as that the more the columns the user selects he can use the grid’s horizontal scroll bar to view the rest of the added columns. This ofcourse will vary according to the size of the monitor if the user has a huge one he won’t have a very long scroll bar like users with small or medium sized monitors.

The problem is the more the columns I show, the datagrid reszies itself causing the application’s horizontal scroll bar to appear leaving me with 2 adjacent horizonal scroll bars the one of the datagrid and below it the one of the application. This is both confusing and irritating for the user, now I have to use both scrollbars to see the new columns added plus other controls above the datagrid are not completely visible, I have to scroll the application’s bar to the right to see them.

I don’t understand, why does the datagrid stretches itself after a certain number of columns. Testing it at a resoluion of 1280×800 initially when the datagrid is with 10 columns and I start showing the other columns the datagrid’s horizontal scroll bar automatically show’s and it keeps getting longer while am adding more columns once i reach the column number 50 the datagrid stretches itself and the application’s horizontal scroll bar appears (the number 50 will be different ofcourse with another resolution).

How can I stop this behavior? I only want the datagrid to fill the maximum screen width available and when there are more columns then there will only be the datagrid’s horizontal scroll bar to use for scrolling left & right through the grid only and not the whole application.

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-13T10:53:48+00:00Added an answer on May 13, 2026 at 10:53 am

    I found 2 solutions either set the datagrid’s property minColumnWidth to a small value like 5 for example and this will fix the width of the datagrid and prevent the application’s scrollbar from showing or you can use this solution found here

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

Sidebar

Related Questions

I have a WPF form that contains a DataGrid. This DataGrid is editable. One
I have a datagrid with 2 columns. One column contains role information, the other
Using .NET 1.1, I have a DataGrid that contains three columns for each row.
I have a Silverlight DataGrid that contains a single template column which displays a
I have a Silverlight 2.0 DataGrid that contains a list of items that needs
I have a datagrid called DataGridView1, column A contains a name, column B contains
I have a Dojo Datagrid in one of my pages (which contains more content)
I have a datagrid in C#.net I have made some columns in grid editable.
We have a form that contains various elements and a datagrid. When the list
I have a GroupBox that contains a stackpanel holding a textbox and a datagrid.

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.