We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

datagrid

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. Ying

1 Reply

AD Administrator 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;

Loader.
Live Chat Icon For mobile
Up arrow icon