I have a .NET windows forms application with one form displaying data. I have
a tree view on the left side and the datagrid on the right side. Tree view
allows the user to select verious items and based on that selection the
datagrid is bound to the appropriate datasource and table from the database.
This works well.

The problem comes when I resize my form and the grid portion is not visible
or just barely visible. Now when I perform the same operations by selecting
various items in the tree I get an exception System.ArgumentException with
Message : '0' is not a valid value for 'value'. 'value' should be between
'minimum' and 'maximum'.
Source : System.Windows.Forms. This happens when I call SetDataBinding method.

When I again resize the form so that the grid is more visible this problem
goes away. I have also seen a bizzare display with red cross over the entire
grid area when I resize the grid again.

Is this a known issue in the datagrid ? Can somebody help me ?

Thanks