Load PropertyGrid from Array

10 posts, 0 answers
  1. Rajasekhar
    Rajasekhar avatar
    2 posts
    Member since:
    Oct 2011

    Posted 31 Oct 2011 Link to this post

    Hi,

    I have class 
     public class Param
     {
            public string Name { get; set; }
            public string[] Values { get; set; }
     }
    My business logic returns an array of Param, i want to show Name as Property Name and show Values in a combobox as possible values for this property  

    for example
                Param[] parms = new Param[]{
                new Param(){Name = "Test", Values = new string[]{"t1","t2"} },
                new Param(){Name = "Test1", Values = new string[]{"t3","t4"} },
                };

    I want to show this data in PropertyGrid with properties as "Test", "Test1" and values "t1", "t2" in combo box against "Test" and "t3" , "t4" against "Test1"

    Can i achieve this with PropertyGrid?

    Thanks & Regards
    Rajasekhar
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 03 Nov 2011 Link to this post

    Hi Rajasekhar,

    In order to achieve this, you will have to add the respective property definitions at runtime, setting proper binding paths. Please, do not hesitate to ask us to prepare such a solution for you if you have encountered any obstacles while implementing it.

    Best wishes,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
  3. DevCraft banner
  4. ben
    ben avatar
    4 posts
    Member since:
    Mar 2011

    Posted 21 Nov 2011 Link to this post

    Hi,

    I'm having difficulty getting the to work, it could be down to the complexity of our code or me doing something stupid.

    Would you be able to provide a working example so I can hopefully find my problem?

    Thanks,
    Ben.
  5. Chuck
    Chuck avatar
    10 posts
    Member since:
    Sep 2012

    Posted 02 Jan 2012 Link to this post

    Is it possible to see a working example for this?
  6. Steven
    Steven avatar
    35 posts
    Member since:
    Apr 2011

    Posted 13 Mar 2012 Link to this post

    Hi,

    I am also interested for a working example.
    I am trying to display an Array inside the RadPropertyGrid.

    Regards,
    S
  7. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 13 Mar 2012 Link to this post

    Hi Steven,

    Would you please shed some more light on your scenario? Do you want to represent an array type property within a PropertyDefinition, or you want to display a list of PropertyDefinitions based on seperate arryay entries? As a side note, it would be nice if you could confirm the current version of RadControls that you are using.

    Greetings,
    Ivan Ivanov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. Steven
    Steven avatar
    35 posts
    Member since:
    Apr 2011

    Posted 13 Mar 2012 Link to this post

    Hi Ivan,

    I would like to represent an array type (IntArray property) within a PropertyDefition.
    It would be great if I can use AutoGeneratePropertyDefinition.

    Example :

    public class TestPropertyGrid
    {
        public string String { get; set; }
        public bool Boolean { get; set; }
        public int[] IntArray { get; set; }
    }

    Thanks,
    S
  9. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 13 Mar 2012 Link to this post

    Hi Steven,

    Thank you for the clarifications. Currently RadPropertyGrid does not provide a native approach to editing colelction type properties. However, we have planned to introduce a new CollectionEditor for RadPropertyGrid with our next Q release. The current recommended approach in such scenarios, is to use custom editor DataTemplates for the respective PropertyDefinitions. In case you would be interested, I can contact you as soon as Q2's beta is released, so that you could check whether the implementation meets your requiremetns and provide us some feedback on this term.

    Kind regards,
    Ivan Ivanov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  10. Steven
    Steven avatar
    35 posts
    Member since:
    Apr 2011

    Posted 13 Mar 2012 Link to this post

    Yes, let me know as soon as a beta for Q2 is released.

    Best regards,
    Thanks Ivan,
    S
  11. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1128 posts

    Posted 15 Jun 2012 Link to this post

    Hello Steven,

    RadControls for Silverlight did not have a public Beta, so that I am writing to you now, when the mentioned version is officially available. Now RadPropertyGrid utilizes a new CollectionEditor control to edit IEnumerable type-compatible properties.

    Kind regards,
    Ivan Ivanov
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
Back to Top
DevCraft banner