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

Disable default exception handling (MessageBox)

Hello,

When exception happens related to GridControl, there is MessageBox shown, as on attached image (example is for IndexOutOfRangeException).

We do not want this MessageBox to appear, because we have separate handling of exceptions in applications.

Is it possible to disable them? If not, can it be implemented soon?

Attachment: ^4B3AC9ABC111B633CF0E7BF845A99B3E1E42DBE97CED0EBB1F^pimgpsh_fullsize_distr_1a1c0493.rar

1 Reply

AR Arulpriya Ramalingam Syncfusion Team September 12, 2017 06:45 AM UTC

Hi Marcin,   
   
Thanks for using Syncfusion products.   
   
Suggestion 1:   
   
In order to avoid the ErrorMessageBox, the ShowErrorMessageBox property can be set to false. Please refer to the below code,   
   
Code example  
   
//To avoid errormessagebox   
this.gridControl1.CurrentCell.ShowErrorMessageBox = false;   
   
Suggestion 2:   
   
In order to avoid displaying the ErrorMessageBox, the CurrentCellErrorMessage event can also be handled. Please make use of below code, sample and KB links,   
   
Code example  
   
//Event Subscription   
this.gridControl1.CurrentCellErrorMessage += GridControl1_CurrentCellErrorMessage;   
   
//Event handling   
private void GridControl1_CurrentCellErrorMessage(object sender,GridCurrentCellErrorMessageEventArgs e)   
{   
    e.Cancel = true;   
}   
   
   
   
Regards,   
Arulpriya   


Loader.
Live Chat Icon For mobile
Up arrow icon