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

grid exception

Every once in a while, I get a pop up message box that reads:
"Do not move current position with this method!"

It seems to happen when I'm changing grid rows while the grid, itself, is binding to data.
In any case, is there any chance that this message could be written to the event log instead of showing up as a message box? Assuming this is something in Syncfusion code (and not Windows)?
We have non-technical users who panic when they see this message.


3 Replies

LS Lingaraj S Syncfusion Team April 2, 2009 04:42 PM UTC

Hi Mark,

Thank you for your interest in Syncfusion product.

I am unable to reproduce this issue where the message box you metioned does not occur in our end.
Please provide a minimul sample reproduces the issue.If you find any exception send as stack trace along with the sample.

Regards,
Lingaraj S



AD Administrator Syncfusion Team April 2, 2009 05:34 PM UTC

It's very difficult to reproduce. It happens in our app which has some tricky databinding stuff going on.
However, the code that shows this error is in the namespace called Syncfusion.Windows.Forms.Grid and is in a class called GridModelDataBinder and in a method called SyncCurrentRecordState.

You can search for it in your code.

There's a condition in that method that will throw an InvalidOperationException which, ultimately, pops up a message box.
It would be useful if a different kind of exception was thrown - one that didn't pop up the message. Or, just log the error to the local event log.

>Hi Mark,

Thank you for your interest in Syncfusion product.

I am unable to reproduce this issue where the message box you metioned does not occur in our end.
Please provide a minimul sample reproduces the issue.If you find any exception send as stack trace along with the sample.

Regards,
Lingaraj S





LS Lingaraj S Syncfusion Team April 3, 2009 01:35 PM UTC

Hi Mark,

Thanks for your update.

Plaese try using CurrentCellAcceptedChanges event to avoid this issue.

Please refer the code below:

this.gridDataBoundGrid1.CurrentCellAcceptedChanges += new CancelEventHandler(gridDataBoundGrid1_CurrentCellAcceptedChanges);
private void gridDataBoundGrid1_CurrentCellAcceptedChanges(object sender, CancelEventArgs e)
{
this.gridDataBoundGrid1.Binder.EndEdit();
}


Please let me know if you still face this issue.

Regards,
Lingaraj S


Loader.
Live Chat Icon For mobile
Up arrow icon