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

Can you bind Property Grid to a data source?

2 Answers 500 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 02 May 2012, 09:24 PM
I was wondering if you can bind the property grid to a dat source like SQL table or microsoft access table?
If so can you show me an example. I have an access table with 6 columns and about 100 rows. I know a gridview is what i shoudl use but i want to use a property grid view.
ID - uniqueID
ParentID - correlates to which ID to group with
Order - order of group
Decs - description of what it is screen display
Type - type
Value - value
example
ID   ParentID   Order      Desc   Type  value
1        0              0           Gen    CAT
2        1              0           help    bool    true               
3        1              1           num    int       7
4        0              1           Dogs   CAT
5        4              0           Labs    int      2
6        5              0           Yellow  int      1
7        5              1           Black   int      1

so the property grid would look like this.
-General
    Help             true
    num              7
-Dogs
   -Labs            2
       Yellow       1
        Black       1
would this even be possible?

2 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 03 May 2012, 10:50 AM
Hi Jay, 

You can bind the Property Grid to a an object, multiple object or add custom properties via a Property Store. Have a look at the documentation here

Hope this helps, but feel free to ask any other questions if you have them
Thanks
Richard
0
Ivan Petrov
Telerik team
answered on 07 May 2012, 02:10 PM
Hello Jay and Richard,

Thank you for writing.

Please, refer to the attached sample project for a sample implementation of a similar case. To achieve your scenario you have to fill the data in a data table and via a custom type and property descriptors to show it into a RadPropertyGrid. There are two limitations, however:
-  you cannot group on more than one level
-  you cannot nest properties inside each other

I hope this will be useful for you. Should you have further questions, I would be glad to help.
 
Kind regards,
Ivan Petrov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
PropertyGrid
Asked by
Jay
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Ivan Petrov
Telerik team
Share this question
or