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.
Unfortunately, activation email could not send to your email. Please try again.

Gris state after an exception in grid grouping control

Thread ID:

Created:

Updated:

Platform:

Replies:

74736 Jun 26,2008 06:26 AM Jun 27,2008 07:08 AM Windows Forms 1
loading
Tags: Grouping
Administrator [Syncfusion]
Asked On June 26, 2008 06:26 AM

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


Jisha Joy [Syncfusion]
Replied On June 27, 2008 07:08 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;