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

Gris state after an exception in grid grouping control

Hi,

Sometimes, when we are dynamically removing rows from our Datatable source, the grid will throw a 'record not found' type of exception (I think because we can call reinitialise possibly at the same time).

I believe this is handled by your code, as we can see a stack trace being printed to the console, but after this (or generally any other type of internally handled exception) happens, the grid loses all records and remains empty (even though we call reinitialise and the data source does have rows).

Are we doing something incorrect or perhaps is there a way to 'kickstart' the grid back into life again? Perhaps some property to know that we need to possibly rebind the source?

Thanks,
Mitul


1 Reply

JJ Jisha Joy Syncfusion Team June 27, 2008 11:08 AM UTC

Hi Mitul,

Thank you for posting query to us.

You can try this code snippet before binding the datasource and let me know if this helps.

this.gridGroupingControl1.SuspendLayout();
this.gridGroupingControl1.ResetTableDescriptor();
this.gridGroupingControl1.TableDescriptor.Relations.Reset();
this.gridGroupingControl1.DataSource = null;
thisgridGroupingControl1.DataMember = null;
this.gridGroupingControl1.DataSource = newdatasource;
this.gridGroupingControl1.ResumeLayout(true);
this.gridGroupingControl1.Reinitialize();
this.gridGroupingControl1.Refresh();


Regards,
Jisha


Loader.
Live Chat Icon For mobile
Up arrow icon