Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1459
IDataErrorInfo called on mouse over
posted

Hi,

We recently had an issue reported about on of our apps running under citrix. The symptom was that if the app was minimised then maximised then the ribbon was blank. Only happened on one screen. We traced the problem to the listobject's IDataErrorInfo.Error setting a  property on the underlying entity, causing validation to fire, rinse and repeat. After fixing this though, I noticed the method was still being called very frequently, particularly when the mouse moved over the grid, triggering a repaint which eventually called the Error method. Is this intentional behaviour, and if so why? Is there any property I can set to manually control when validation takes place

Thanks,

Kevin

Parents
  • 469350
    Offline posted

    Hi Kevin,

    I'm a little confused about the relationship between the Ribbon and IDataErrorInfo. Ribbon has no support for DataBinding or IDataErrorInfo that I am aware of. So I assume you are talking about WinGrid here?

    In any case, the grid is going to need to call into the IDataErrorInfo interface any time the row or cell paints and that includes when the mouse moves over a cell or row. So you need to make your IDataErrorInfo interface as efficient as possible. If you are re-validating the data every time this interface is called, then that will be very inefficient. You should cache the validation results and only re-validate when the data changes.

Reply Children