Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > PropertyGrid > Can you bind Property Grid to a data source?

Not answered Can you bind Property Grid to a data source?

Feed from this thread
  • Jay avatar

    Posted on May 2, 2012 (permalink)

    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?

    Reply

  • Posted on May 3, 2012 (permalink)

    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

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.
  • Ivan Petrov Ivan Petrov admin's avatar

    Posted on May 7, 2012 (permalink)

    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 >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > PropertyGrid > Can you bind Property Grid to a data source?