How to use the Gridview as a property editor?

5 posts, 0 answers
  1. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 15 Jun 2010 Link to this post

    Hello,

    i have some properties the user should be able to edit in the configuration of my project.
    i would like to create a form with a radGridView similar to the property window of the visualstudio where we edit the properties of a control. So the radGridView should contain 2 columns. The first column contains the names of the properties and the second column contains the values for the properties. The values of the properties could contain different values like text, numeric, enumerations, ..

    What would be the best way to create the second column?

    Kind Regards,

    Ramius
  2. Svett
    Admin
    Svett avatar
    728 posts

    Posted 18 Jun 2010 Link to this post

    Hello Ramius,

    In your scenario you need a property grid. We have nailed this feature in our plans for one of the next major releases. In the meantime, you can create a grid with 3 columns. The first column should be a read-only GridViewTextBoxColumn, where you will store the name of the properties. In the second column you should store corresponding values. You can create again a GridViewTextBoxColumn. When you try to edit a value, you should create the right editor depending on the type of the property. You can use EditorRequired event to do that. In addition, I would recommend you to create a 3rd invisible column, where you should store the type of the property. Then you can create the editor depending on the type stored in the invisible column. You can read more about editors in this documentation article.

    Sincerely yours,
    Svett
    the Telerik team
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 22 Jun 2010 Link to this post

    Hello Svett,

    thank you for your help. I will do it as you suggested with the 3 column.

    Great to hear that you will extend the gridview so that it can be used as a property grid.

    Kind Regards,

    Ramius
  5. devoas
    devoas avatar
    69 posts
    Member since:
    Dec 2009

    Posted 09 Jun 2011 Link to this post

    Hello,

    We came across similar kind of requirement as property Grid. We understand the editor mechanism how to set different editors.  But we need help on how to set custom RadElement having textbox + button on EditorRequired event as this requires Editor and we have custom element.



    Property

    Value

    TextField

    TextBox Editor

    Multi-Select List

    TextBox with Button



    Thanks
    devoas


  6. Svett
    Admin
    Svett avatar
    728 posts

    Posted 15 Jun 2011 Link to this post

    Hello devoas,

    You need to create a custom editor which will contains instances of RadButtonElement and RadTextBoxElement. You can read the online documentation about how you can create a custom editor.

    Kind regards,
    Svett
    the Telerik team
    Q1’11 SP1 of RadControls for WinForms is available for download; also available is the Q2'11 Roadmap for Telerik Windows Forms controls.
Back to Top
UI for WinForms is Visual Studio 2017 Ready