I have TableLayoutPanel with one row and six columns. I'm adding for each column one FlowLayoutPanel. In FlowLayoutPanels I'm adding dynamically controls.
I can't add controls directly to TableLayoutPanel becouse adding and deleting is too slow for many rows (removing controls from row and then moving controls from rows below one row up).
But when I'm adding controls to FlowLayoutPanel, TableLayoutPanel doesn't show ScrollBar.
What I have is:
TableLayoutPanel: 1 row, 6 cols, DockStyle:Fill, AutoScroll:True
FlowLayoutPanel: DockStyle:Fill, FlowDirection:TopDown, WrapContents:False
ScrollBar must show in TableLayoutPanel.
Sample code (I don't think that it helps, rest is set in visual mode):
// create controls
CheckBox control1 = new CheckBox();
ComboBox control2 = new ComboBox();
ComboBox control3 = new ComboBox();
ComboBox control4 = new ComboBox();
ComboBox control5 = new ComboBox();
CheckBox control6 = new CheckBox();
control1.AutoSize = false;
control1.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
control3.DropDownStyle = ComboBoxStyle.DropDownList;
control3.Enabled = false;
control4.DropDownStyle = ComboBoxStyle.DropDownList;
control4.Enabled = false;
control5.DropDownStyle = ComboBoxStyle.DropDownList;
control5.Enabled = false;
control6.AutoSize = false;
control6.CheckAlign = System.Drawing.ContentAlignment.MiddleCenter;
control6.Enabled = false;
// add to float layout panels
this.flayControl1.Controls.Add( control1 );
this.flayControl2.Controls.Add( control2 );
this.flayControl3.Controls.Add( control3 );
this.flayControl4.Controls.Add( control4 );
this.flayControl5.Controls.Add( control5 );
this.flayControl6.Controls.Add( control6 );
And image, as you see, no scrollbar on left, but controls are hiding at the end (TableLayoutPanel is control with borders):

TableLayoutPanel? Why not simply use aPanel? - Reza AghaeiDataGridView. Hope you find this answer helpful. Let me know if you have any question about the answer. - Reza Aghaei