TableLayoutPanel AutoScroll DataGridViews Child controls


I reviewed several forum questions regarding this
like this one

MY APOLOGIES I cannot easily whip up a sample that closely resembles my real solution.
I am about to whip up a test project just to confirm normal functionality BUT —

TableLayoutPanel AutoScroll set to true ( well I’ve tried several combinations ha ha )
Child controls DataGridViews do not have property AutoScroll

what is the magic formula for getting DataGridViews inside of
a TableLayoutPanel to actually display the scroll bars?

Is there some required hierarchy for Anchor settings, Dock settings
for any of these controls… the TableLayoutPanel, the DataGridViews
anything that could be preventing the scrollbars from displaying ?

These are bound DataGridViews .. even the main table layout panel control itself,
only briefly displays scrollbars but they disappear almost instantly when
resizing the browser window.
Does the AutoScroll property have to be inherited from the BaseControl through the
TableLayoutPanel in order for my DataGridViews which do not have the AutoScroll property,
to actually display scrollbars?
I just made the root page [BaseControl] AutoScroll property true and turned off its ScrollBars property
to none and again when resizing the browser this BaseControl appears top be the only thing
displaying ScrollBars albeit briefly.

  • You must to post comments

My Freight Orders screenshot shows the vertical scrollbar..
I have attempted to force all governing layoutpanels that are housing these grids to the maximum
right side of the screen with anchors, dock styles
etc — thus my question,    but I can’t get a horizontal scrollbar to manifest.
As you can see from the earlier screenshot there is a bit of screen real-estate still available.. off to the right
I’m assuming this is the nature of the problem the dgv isn’t at the extent/extreme of the
page/usercontrol and that’s why there is no horizontal scrollbar … ?   ? Dock, Anchor ?

I am honestly just trying to avoid crafting up this usercontrol (page) from scratch as the conversion seems to

have lost this functionality.. as shown in this attachment . I am   pretty sure I could craft what I want manually

  • Luca (ITG)
    There is no horizontal scrollbar because the columns fit. The extra space on the right in the Wisej.NET app is the way your app is built. If you create a small sample with the same controls in it and you see the same issue we can help set the correct layout.
  • You must to post comments

The scrollbars in the DataGridView have absolutely nothing to do with the scrollbars in the TableLayoutPanel. I don’t see any “madness” in the screenshots.

The content of a TableLayoutPanel is scrolled when AutoScroll is true and the content overflows. The content of a DataGridView is scrolled when the rows or columns don’t fit the DataGridView.

  • You must to post comments

Yes  apologies I assumed my question was going to come off as pretty cryptic . I just want some degree of consistency in how to get scrollbars to display in my DataGrid Views . The image attached earlier is my best description ScrollBar_Insanity.png  That dgvResults needs horizontal scroll bars and I cant confirm if I need to set Auto Scroll true on ALL of the  TableLayOutPanels “above” it,   or  ScrollBars = BOTH on all the TableLayOutPanels  above it  or if any of this is affected by the Dock property or Anchor property  etc etc   its just maddening .. this little test project didn’t help any…. its still clear as MUD

Thank  you !

  • You must to post comments

Hi Christian,

sorry it’s unclear what you’re trying to achieve. Please put together a sample that shows the TableLayoutControl and the DataGridView.
DGVs can be filled with just some dummy data to illustrate the question.

Best regards

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.