* DataGrid.cs: Create columns when the binding context has been
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / DataGrid.cs
index 208c8749474ecad69cf5b9bd4b79f87612c2c662..019f6ee91ce96655fa3678f86048edf0ade708b1 100644 (file)
@@ -1194,6 +1194,9 @@ namespace System.Windows.Forms
                protected override void OnBindingContextChanged( EventArgs e)
                {
                        base.OnBindingContextChanged (e);
+
+                       current_style.CreateColumnsForTable (false);
+                       CalcAreasAndInvalidate ();
                }
 
                protected virtual void OnBorderStyleChanged (EventArgs e)