D
Daniel Manes
I've been placing controls and setting properties with Visual Studio.
Haven't written a single line of code. All of a sudden, I get this
error (in a dialog) when I try to open one of my forms:
-----
The control System.Window.Forms.TableLayoutPanel has thrown an
unhandled exception in the designer and has been disabled.
Exception:
Item has already been added. Key in dictionary: 'FilterTableLayoutPanel
[System.Window.Forms.TableLayoutPanel], BorderStyle:
System.Windows.Forms.BorderStyle.None' Key being added:
'FilterTableLayoutPanel [System.Windows.Forms.TableLayoutPanel],
BorderStyle: System.Windows.Forms.BorderStyle.None'
-----
So I hit OK, and, since this form uses a TabControl, I cycle through
the TabPages. All appear fine except one, which, instead of controls,
has a stack trace slapped over it. The strange thing is, this is not
the TabPage that contains the FilterTableLayoutPanel referred to in the
error message above (it's one page to the left of that one).
Another strange thing is that I can't copy the contents of the stack
trace or even scroll to see the entire message.
After trying a few things that didn't help, I started deleting controls
until the error went away. I finally isolated it down to this: I have a
DataGridView that's bound to a data source on the TabPage with the
stack trace error on it. When I unbind that (set "Choose Data Source"
to None), the error goes away. When I rebind it again, the error comes
back.
But there's more. I also determined that if I shuffle the order of the
tabs, moving the tab with the offending control to later in the
sequence, it also works. If I return the tab order to the one I
actually want, the error returns. Even I create a *new* tab and drag
all the controls into that, doesn't matter--still get the error.
Has anyone seen anything like this? What the heck could be going on?
Really hope someone here can help with this because I've blown almost a
whole day on this problem and I'm totally stuck at this point.
Thanks!
-Dan
Haven't written a single line of code. All of a sudden, I get this
error (in a dialog) when I try to open one of my forms:
-----
The control System.Window.Forms.TableLayoutPanel has thrown an
unhandled exception in the designer and has been disabled.
Exception:
Item has already been added. Key in dictionary: 'FilterTableLayoutPanel
[System.Window.Forms.TableLayoutPanel], BorderStyle:
System.Windows.Forms.BorderStyle.None' Key being added:
'FilterTableLayoutPanel [System.Windows.Forms.TableLayoutPanel],
BorderStyle: System.Windows.Forms.BorderStyle.None'
-----
So I hit OK, and, since this form uses a TabControl, I cycle through
the TabPages. All appear fine except one, which, instead of controls,
has a stack trace slapped over it. The strange thing is, this is not
the TabPage that contains the FilterTableLayoutPanel referred to in the
error message above (it's one page to the left of that one).
Another strange thing is that I can't copy the contents of the stack
trace or even scroll to see the entire message.
After trying a few things that didn't help, I started deleting controls
until the error went away. I finally isolated it down to this: I have a
DataGridView that's bound to a data source on the TabPage with the
stack trace error on it. When I unbind that (set "Choose Data Source"
to None), the error goes away. When I rebind it again, the error comes
back.
But there's more. I also determined that if I shuffle the order of the
tabs, moving the tab with the offending control to later in the
sequence, it also works. If I return the tab order to the one I
actually want, the error returns. Even I create a *new* tab and drag
all the controls into that, doesn't matter--still get the error.
Has anyone seen anything like this? What the heck could be going on?
Really hope someone here can help with this because I've blown almost a
whole day on this problem and I'm totally stuck at this point.
Thanks!
-Dan