Quote Originally Posted by wila View Post
Dave,

That's a good question, the answer also depends a bit on exactly the error that the user is reporting. I based this solution on the callstack that Bob showed the screenshot from.

Basically there are two ways to look at this.

Yes, it would be good because the method makes no sense if the codejock grid isn't created yet.
No, because you are hiding an error which means your control might not be working the way it was designed without even getting an error about it.

I'm leaning to the former version. The framework is sending this message, but it is also the framework that caused the codejock control to not be created yet.

The most common reason for that would be if it is on a tabdialog page that isn't currently visible.
The side effect of hiding this error is that your codejock grid might not have the expected record loaded when you change to that tabdialog.
So you might have to add an additional "MoveToFirstRow" on tab navigation.

So it is a matter of weighing the side effects that you might see if this situation happens.
Another thing you could do is to still trigger an error, but make it more descriptive.
Eg: "Error, the MoveToFirstRow method was called when the grid did not exist yet. Please notify your developer" -> stack trace

--
Wil
thanks for the observations. I might try putting it in, and adding a decent comment saying why and why not. Might help me recall why I did it.