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
520
Idataerrorinfo, ultragrid
posted

I am using two windows for one binding source. When I change data from different window, and come back to main window with changed of data, data has been changed to main windows but idataerrorinfo will not get trigger unless I mouse over to changed row. So when I mouse over then after it shows error icon, I want to show right the way when I come to main window.

Please guys give me some idea.

Thanks 

rubie

  • 469350
    Offline posted

    Hi Rubie,

    The BindingManager and typical data sources don't notify controls when the IDataErrorInfo changes. They only send notifications when the data changes - presumably they expect that an error will never change unless the data changes, too.

    So if both grids are bound to the same data source and you make a change to that data source which changes the IDataErrorInfo, it should work. But if you are changing something that changes the condition under which an error occurs without actually changing the data, then the grid won't know to update itself.

    In the latter case, you would need to force the grid to update it's display. It's hard to say for sure without being able to test it, but something like this will probably work:

    this.ultraGrid1.Rows.Refresh(RefreshRow.ReloadData);

    If that doesn't work, try this:

    this.ultraGrid1.DisplayLayout.UIElement.DirtyChildElements(true);

    If that still doesn't work, then maybe you could post a small sample project here which demonstrates the problem and I will be happy to check it out and find a solution that does work.