Thanks in Advance
15 Answers, 1 is accepted
Actually, RadPropertyGrid does not support Editor Attribute for the time being. However, it is a good idea and we will definitely consider its implementation. I have logged it in our system as a feature request.
As for providing a solution for the current state of RadPropertyGrid, I would need a bit more details about your exact scenario. Would it appropriate for you to define PropertyDefinition-s and set the required editor inside ?
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
class MyItem
{
...
[EditorAttribute(typeof(myUITypeEditorclass), typeof(System.Drawing.Design.UITypeEditor))]
publuc Mytype ThisProperty { set;get;}
}
My recommendatation would be to create the editor you require and set it as Editor for the property you want. Another possible approach would be to work with data template selectors as illustrated in this demo.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
I want to suggest another feature which I understand radpropertygrid does not support yet. The Question here shows how we can display just the properties required and prevent not wanted ones be used by propetygrid. But actually it didn't worked on my wpf project and after debugging I understood the TypeConverter didn't consider by propertygrid. It'll be quite useful if it support such capability.
Thanks for your attention
I might be missing something here, but why not working with Browsable attribute instaead ? Please take a look at our demos for a reference.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
The problem with browsable is it needs a constant parameter to show or show not an attribute. But in that case I did not know which attributes needs to be displayed till run-time. It's kind of a user's choice dependent situation. when creating an instance of the object it clarifies which one has to be shown.
I implemented CustomTypeDescriptor and CustomPropertyDescriptor (for the RadPropertyGrid). This gave me the support to define attributes/properties/events at runtime.
http://msdn.microsoft.com/en-us/magazine/cc163816.aspx (an older article, but works :) )
Perhaps you could find a similar solution using this approach.
Thanks!
Bill
I am actually developing the feature at the moment. I will expose a new attribute that will have editor control, target property and style (dropDown, Modal, None) as properties and will enable the user to define an editor quite more easily than the WinForms approach with inheriting from UITypeEditor. Thus you will be able to add directly just a RadNumericUpDown for a particular numeric property.
Will that fit into your scenario ? If appropriate for you, could you share more information about your exact settings so that we can test it during the QA process ?
Thank you in advance for the cooperation or any feedback that you have.
Regards,
Maya
Telerik
Thank you for the feedback. The feature will be included in one of our next internal builds right after our testing procedures are passed.
Regards,
Maya
Telerik
Hello ,
This is almost a four years old post, and looks like this is still not supported. Please confirm?
10x
This feature is actually introduced as of Q2 2014 SP1. You can check out the Release History for this version. I suggest you also taking a look at the Editor Attribute topic for more information on this matter.
All the best,
Stefan X1
Telerik
Hi Stefan,
Is there any option to complete invoke our own dialog instead of invoking usercontrol with editor style as Modal.I required it because I don't want to have minimize and maximize buttons for my window,I want to give my own title and image to the window. I feel UITypeEditor in Winfroms is flexible to use than this Editor attribute in Telerik.
I have another requirement of opening OpenFileDialog when user clicks edit button. How to achieve this??
Regards,
Nagasree.
I've attached a sample project where I'm handling RadPropertyGrid's BeginningEdit event and initializing a new RadWindow there in order to achieve the desired behavior. You can use it as a guide and implement your own custom logic. Bear in mind that for this to work,EditMode should be set to Single.
Regarding your second requirement, you can have a look at the AutoBindBehavior with EditorTemplateSelector demo from the SDK Samples Browser which demonstrates a similar behavior.
I hope you find this helpful. Do let me know if you need any further assistance on the matter.
Regards,
Dilyan Traykov
Telerik by Progress