This is a migrated thread and some comments may be shown as answers.

Load PropertyGrid from Array

9 Answers 85 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Rajasekhar
Top achievements
Rank 1
Rajasekhar asked on 31 Oct 2011, 11:57 AM
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

9 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 03 Nov 2011, 02:02 PM
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 >>
0
ben
Top achievements
Rank 1
answered on 21 Nov 2011, 09:44 AM
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.
0
Chuck
Top achievements
Rank 1
answered on 02 Jan 2012, 05:14 PM
Is it possible to see a working example for this?
0
Steven
Top achievements
Rank 1
answered on 13 Mar 2012, 02:00 PM
Hi,

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

Regards,
S
0
Ivan Ivanov
Telerik team
answered on 13 Mar 2012, 02:14 PM
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 >>
0
Steven
Top achievements
Rank 1
answered on 13 Mar 2012, 02:24 PM
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
0
Ivan Ivanov
Telerik team
answered on 13 Mar 2012, 02:35 PM
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 >>
0
Steven
Top achievements
Rank 1
answered on 13 Mar 2012, 02:49 PM
Yes, let me know as soon as a beta for Q2 is released.

Best regards,
Thanks Ivan,
S
0
Ivan Ivanov
Telerik team
answered on 15 Jun 2012, 08:42 AM
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 >>
Tags
PropertyGrid
Asked by
Rajasekhar
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
ben
Top achievements
Rank 1
Chuck
Top achievements
Rank 1
Steven
Top achievements
Rank 1
Share this question
or