I have a combobox and a datagrid in a form. The data source is a table in a dataset. The data table will be clear and refill according the change of combobox. The problem happens when I try to click the datagrid (enter cell of a new row) while the dataset is empty. The message is Unhandled exception (index out of bound array). This exception happens randomly, couldn't be catch either in mouse down event or click event. Any one met the similar problem? I doubt the datagrid has some bugs in it.
ADAdministrator Syncfusion Team November 14, 2002 08:09 AM
You might try resetting the currenty cell to 0,0 before you set a new datasource (from a change in your combobox).
this.datagrid1.CurrentCell = new DataGridCell(0,0);
//now set the new datasource
this.dataGrid1.DataSource = newDataSource;