We are currently using the project at http://slg40.codeplex.com/ for our property grid. One of the nice things about it is we can develop custom dialogs/editors for properties. For example, we have a hierarchy of busines divisions/groups/teams containing hundreds of nodes. We can create a custom dialog to let the user drill through a RadTreeView hooked up to a web service using LoadOnDemand to find a particular node. We can then have a property of type Team, and tell the property grid that objects of type Team should use the custom editor.
Another property editor we need is multi-select. In the Attribute declaration for the property we could specify a delegate to return a List of objects, and the property editor would basically look like a multi-select combo box. We can code this up ourselves if necessary, we just need the attribute support baked in.
Would love to see you guys get custom editor support in your PropertyGrid!
We love using your controls!
Thanks
7 Answers, 1 is accepted
I believe even the current version of RadPropertyGrid allows placement of custom editors.
You can place any content as editor with just a few lines of code. For example the Color picker in this online demo is placed using this approach . There is source code available as well.
Best wishes,
Pavel Pavlov
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
![](/forums/images/avatarimages/default.gif)
![](/forums/images/avatarimages/loading.gif)
Your example, and hence how the control is designed today, prefers to define the editor in the AutoGeneratingPropertyDefinition method [when you have more than one object type bound to a particular property editor]. It makes more sense for the objects you are "property browsing" to themselves define how they should be displayed and the logic for that display should be in the objects. The attraction of this approach grows as you need more and more different object types [with custom editors] bound to the property browser.
We have discussed introducing a uniform approach to defining editor templates for RadPropertyGrid and evaluating the recent feedback, we have come to the conclusion that the TemplateSelector approach would be most convenient one for our customers. We have just started working upon this feature, so it will be available in some of our future releases. We highly appreciate your feedback on this term and we would be glad to hear your opinion on the described feature.
Kind regards,
Ivan Ivanov
the Telerik team
![](/forums/images/avatarimages/default.gif)
A uniform approach would be much nicer than cluttering up the ..._AutoGeneratingPropertyDefinition method.
As I just converted a custom property [displayed in the property grid] from the SL30PropertyGrid to telerik, I thought it would be helpful to share some of my notes with others.
- If you want to update the source object [that the property grid has as its .Item property], your custom control must implement the INotifyPropertyChanged Interface.
- In your custom control, you should look at the bound data in your custom control's load event or the changed property that may have been set in the DependencyProperty.Register call. For example, if you try to set a text box in the property {set} you will be sorely disappointed that it is NOT updating. For me, it I registered the property as public static readonly DependencyProperty ExtendedXPathProperty = DependencyProperty.Register("ExtendedXPath", typeof(string), typeof(SPListItemExtendedXPathEditor), new System.Windows.PropertyMetadata(ExtendedXPath_Changed));. Notice "ExtendedXPath_Changed". Although, you may simply be ok with looking at the control's load event if you never expect the property to change...except through the property grid...while browsing the property.
My data template looks like the following. Note that I found it useful to also include a TextBox in a stackpanel for debug purposes. You may also find it helpful. Please note that I don't think I fully understand how to do the format painter so ignore and <br> tags as they aren't valid.
<
DataTemplate
x:Key
=
"SPListItemExtendedXPathEditorTemplate"
>
<
StackPanel
Orientation
=
"Vertical"
>
<!--
<
TextBox
Text
=
"{Binding ExtendedXPath, Mode=TwoWay}"
/>
-->
<
blueclarityPropertyBrowserSPListItem:SPListItemExtendedXPathEditor
ExtendedXPath
=
"{Binding ExtendedXPath, Mode=TwoWay}"
SourceURI="{Binding
SourceURI,
Mode
=
TwoWay
}"
/>
</
StackPanel
>
</
DataTemplate
>
![](/forums/images/avatarimages/default.gif)
Can we decorate our business objects to define our custom editor now?
We have added similar feature request in our Public Issue Tracking System. I would encourage you to vote for it so that is rating gets higher, consequently its priority.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.