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

How to use the Gridview as a property editor?

4 Answers 114 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ramius
Top achievements
Rank 1
Ramius asked on 15 Jun 2010, 11:32 AM
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

4 Answers, 1 is accepted

Sort by
0
Svett
Telerik team
answered on 18 Jun 2010, 09:32 AM
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
0
Ramius
Top achievements
Rank 1
answered on 22 Jun 2010, 10:01 AM
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
0
devoas
Top achievements
Rank 1
answered on 09 Jun 2011, 04:05 PM
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


0
Svett
Telerik team
answered on 15 Jun 2011, 08:00 AM
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.
Tags
GridView
Asked by
Ramius
Top achievements
Rank 1
Answers by
Svett
Telerik team
Ramius
Top achievements
Rank 1
devoas
Top achievements
Rank 1
Share this question
or