Nested Property parent

7 posts, 0 answers
  1. Akram
    Akram avatar
    45 posts
    Member since:
    Dec 2012

    Posted 13 Dec 2012 Link to this post

    Hi
    is there a way to get the Parent PropertyGridField of a nested property.

    I saw a property called ParentField, but unfortunately this property is visualize tree only, i can see it only in vs debugging

    Thanks,
    Akram
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 14 Dec 2012 Link to this post

    Hi,

    ParentField is an internal property of PropertyGridField. You can try traversing the VisualTree to find the field that you need. Would you please what are you trying to achieve, so that we could think of some more elegant solution?

    All the best,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Akram
    Akram avatar
    45 posts
    Member since:
    Dec 2012

    Posted 14 Dec 2012 Link to this post

    Thanks for your replay, i found the solution using .net reflection.
    To get the parent field just call field.ParentOfType<PropertyGridField>();

    Now i am stuck on refreshing the PropertyGridField value, my case is when i change the value out side the PropertyGrid then i still the same old value inside the PropertyGridField. I know i should dervive from INotifyPropertyChanged interface but unfortunately i can't do that for my case. 
    What i need is a way to tell the properyGrid to refresh its values from the origin source. 



    Thanks
    Akram
  5. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 14 Dec 2012 Link to this post

    Hi,

    RadPropertyGrid relies exclusively on bindings and bindings get notified of changes via the INotifyPropertyChanged interface. There is no alternative solution. Would you please share why can't you use it?

    All the best,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Akram
    Akram avatar
    45 posts
    Member since:
    Dec 2012

    Posted 14 Dec 2012 Link to this post

    Yes, there are several reasons, one of them is the object is in a closed dll (i am not the owner of the object).

    All i need is a way to tell the PropertyGridField to re read the value again from the origin source, so i can call this method after i update the value out side the propertyGrid

    Thanks,
    Akram
  7. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 14 Dec 2012 Link to this post

    Hello,

    In case this class is not sealed, you can inherit from it, implement the interface on the new class and wrap the inherited properties raising the PropertyChanged event in the setters.

    Greetings,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  8. Akram
    Akram avatar
    45 posts
    Member since:
    Dec 2012

    Posted 14 Dec 2012 Link to this post

    I am not believe that this is a good idea, all i want is a way to refresh the current field value.

    My project depend on this thing, i can't  continue using RadPropertyGrid if this feature impossible to work,

    Thanks
    Akram 
Back to Top
UI for WPF is Visual Studio 2017 Ready