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
1886
Validation and IDataErrorInfo
posted

I am vailidating the data displayed within my datagrid using the IdataErrorInfo interface (as described in a few other posts here oin the forum).  The final problem that I am having is walking the visual tree of my current UI and finding all the controls that are in an error state. 

          foreach (object child in LogicalTreeHelper.GetChildren(obj))
            {             
                if (child is TextBox)
                {
                    TextBox element = child as TextBox;

                    if (element.GetBindingBLOCKED EXPRESSION I get a recordPresenter as the Child element and it has no children.....

Thanks

Parents
No Data
Reply
  • 69686
    posted

    Hello,

    You can try using our helper methods for traversing the element tree of the application:

    Infragistics.Windows.Utilities.GetAncestorFromType(...);

    Infragistics.Windows.Utilities.GetDescendantFromType(...);

    Infragistics.Windows.Utilities.GetAncestorFromName(...);

    Infragistics.Windows.Utilities. GetDescendantFromName(...);

Children