I have three choices for one of the property and I am showing them in combobox.Once user changes the choices we will take confirmation from user if he says no I have to retain the old value and show in the combo the selected value as oldvalue.But here I am not changing the value of model property but combobox value changing to new value.How to stop it??
Property Name :Transportation
Property Values : Enum vehicles
7 Answers, 1 is accepted
In the above post I have given half information. If Selected value is Bus and then user changes to car.We will ask confirmation and If he says no I should not select car.But here in propertygrid it is showing Car.
How to stop this??
Basically, you should be able to revert to the previous selected item through the Selection mechanism of the control. May I ask you to share a little more information on how the combobox editor is defined?
Telerik by Progress
I didn't specified Combobox Editor,PropertyGrid itself giving the Combobox Editor as the property type is Enum. As we know based on the type of the property propertygrid itself provides respective template for the PropertyValue,here I am gettting the Combobox.
RadPropertyGrid does not expose its autogenerated editors for such modifications. A possible approach would be to define the EditorTemplate for the particular PropertyDefinition and setup the combobox within it. Please take a look at the Customized Property Definitions topic for more information on the matter.
Hopefully, this helps.
Telerik by Progress
I have checked ComboboxEditorBooleanProperty_WPF sample application. I already tried to create usercontrol and use it.But I am not able to achieve my expected behavior.
I have explained my problem in the above post still clearly. I completely blocked by this problem.Could you please help me??
I am providing some more information here. Last one week I am doing lot of trial and errors.I will share that information with so that you can help me further.
Property for which I am using above mentioned usercontrol as Editor.
I am populating the combobox from code behind in fieldloaded event as I didn't find any nice other approach as shown below.
Now I want to bind the selected Item in the combobox to the string Property.How to achieve this??
I tried to bind to the property in usercontrol creating DependencyProperty but I am not succesful.Please give solution as soon as possible.
I found answer here http://www.telerik.com/forums/how-to-show-list-string-as-combobox-values-instead-of-collection-editor#JX8h-tbgvkS_iBnINcu9iQ