How ti bind dictionary to RadProperty grid

6 posts, 1 answers
  1. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 15 Sep Link to this post

    Hi Everyone,
    I want to bind Dictionary to Rad property grid. But this dictionary keys and values are run time generator. When I choose DB1 it may be 3 keys and 3 values if I choose DB2 it may be 8 keys and 8 values. Here I don’t want to update Property Grid Xaml when Dictionary values changes.
    Can anyone provide solution with help of sample application as soon as possible.

    Regards,
    Rajendar.

  2. Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 19 Sep Link to this post

    Hello Rajendar,

    In order to ensure that we are on the same page, can you please some more details about your requirement? If I am understanding you correctly, you need to be able to change the source collection, but not affect the UI? Can you please confirm that?

    Regards,
    Stefan X1
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 19 Sep in reply to Stefan X1 Link to this post

    Hi Stefan,

    I have dictionary  something like below.

    Dictionary<string, string> dictionary = new Dictionary<string, string>();
    dictionary.Add(“appu”,”100”);dictionary.Add(“sree”,”101”);dictionary.Add(“khan”,”111”);

    Property Grid
    appu 100
    Sree 101
    Khan 111

    Whenever new person join I will add new entry in dictionary. That should reflect in property grid.

    Regards,

    Rajendar.


  5. Answer
    Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 22 Sep Link to this post

    Hello Rajendar,

    Thanks for this clarification.

    In order the control to be updated when an item is added, a collection changed notification should be raised. As this is not supported by the default IDictionary, you may consider implementing an ObservableDictionary. Please take a look at the Binding to a Dictionary blog post and the .NET ObservableDictionary StackOverflow thread for more information on the matter.

    I hope you find these resources helpful.

    Regards,
    Stefan X1
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Rajendar
    Rajendar avatar
    69 posts
    Member since:
    Jun 2013

    Posted 14 Oct in reply to Stefan X1 Link to this post

    Hi Stefan,

    Sorry for late reply. Can you please provide sample application.

    Regards,

    Rajendar

  7. Stefan X1
    Admin
    Stefan X1 avatar
    514 posts

    Posted 18 Oct Link to this post

    Hi Rajendar,

    In order to provide you with an appropriate example, may I ask you what requirements do you need to satisfy with RadPropertyGrid? Are you just trying to populate the objects from the dictionary, or you are planning to use some of the functionalities of the  control?

    Regards,
    Stefan X1
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for WPF is Visual Studio 2017 Ready