I have a datagrid contained in vbox, this datagrid acts like a spreadsheet containing 70 columns, initially 10 are visible and the rest are hidden, and the user selects which other columns are displayed dynamically. I need this datagrid to use the maximum screen width, so I set the application width to 100%, as well as vbox and datagrid, I also set the horizontalscrollpolicy for the datagrid to βautoβ, so the more columns the user chooses that he can use horizontal grid scroll bar to view the remaining columns added. This may vary depending on the size of the monitor, if the user is huge, he will not have a very long scroll bar, such as users with small or medium sized monitors.
The problem is that the more columns I show, the datagrid itself causes the horizontal scrollbar of the application to appear, leaving me with two adjacent horizontal scrollbars, one of the data, and one of the applications underneath. This is both confusing and annoying for the user, now I have to use both scroll bars to see the new columns added, plus the other controls above the datagrid are not completely visible, I need to scroll the application bar on the right to see them.
I do not understand why a datagrid is stretched after a certain number of columns. By checking it with a resolution of 1280x800 initially, when the datagrid has 10 columns, and I start showing other columns, the horizontal scroll bar of the datagrid is automatically displayed, and it continues to increase when I add more columns, when I reach the column number 50, which the datagrid stretches itself and a horizontal scroll bar of the application will appear (number 50 will differ from another resolution).
How can I stop this behavior? I want the datagrid to fill the maximum width of the screen, and when the number of columns is greater, then only the horizontal datagrid scrollbar will be used, which will be used to scroll left and right only along the grid, and not throughout the application.
Thanks in advance