0

I added 1000 of group Controls in the TableLayoutPanelat run time. After execution it shows around 300 controls in the respective rows. After the 300th row, rows are added but controls in the respective added rows are not visible.

My programming code/logic goes like this:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

    Dim tableLayoutPanel As New TableLayoutPanel
    tableLayoutPanel.Dock = DockStyle.Fill
    tableLayoutPanel.AutoScroll = True
    tableLayoutPanel.RowCount = 1000

    For i = 0 To 999

        Dim groupCtrl As New DevExpress.XtraEditors.GroupControl
        groupCtrl.Text = String.Format("Group Control {0}", i)
        groupCtrl.Dock = DockStyle.Fill
        groupCtrl.Visible = True
        groupCtrl.Enabled = True

        tableLayoutPanel.Controls.Add(groupCtrl, 0, i)

    Next

    Dim c = tableLayoutPanel.Controls.Count

    Me.Controls.Add(tableLayoutPanel)

End Sub

How can I view all the controls in the TableLayoutPanel?

Bugs
  • 4,491
  • 9
  • 32
  • 41
Anjali
  • 1
  • Possible duplicate of [Table layout panel scroll bar](http://stackoverflow.com/questions/4794153/table-layout-panel-scroll-bar) – Mederic May 12 '17 at 12:11
  • Please explain it again ,the link you mentioned did not solved my problem. – Anjali May 12 '17 at 12:11
  • @Mederic I don't think that link helps the OP to be honest. I have managed to replicate and it _seems_ like a memory issue maybe. – Bugs May 12 '17 at 12:17
  • @Bugs I see in that case would be better to dynamically generate the lines 100 by 100 maybe. 1000 lines is to much anyway. – Mederic May 12 '17 at 12:18
  • @Mederic yeah it's not best practice to throw loads of controls on like this. – Bugs May 12 '17 at 12:28
  • Do anyone find solution or what is the alternative way? – Jaydeep Karena Aug 06 '18 at 11:03

0 Answers0