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

RadDropDownButton Validation style

5 Answers 60 Views
Buttons
This is a migrated thread and some comments may be shown as answers.
Predrag
Top achievements
Rank 1
Predrag asked on 12 Dec 2011, 12:01 PM

I’m using RadDropDownButton inside DataForm, it contains RadTreeView from which user can select item. This property is required in my model, so when validation is performed in validation summary error message appears, but RadDropDownButton style is not changed (red border and tooltip). Is it possible to set this style (like for RadComboBox).

 

Best regards,

Predrag

5 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 15 Dec 2011, 02:39 PM
Hi Predrag,

The RadDropDownButton doesn't implement validation states out-of-the-box. But you can edit its ControlTemplate to add validation states and then implement your own logic to go to the appropriate visual state. You can examine the current structure of the RadDropDownButton.ControlTemplate here. And I also attached a sample project to get you started. Please let us know if we can further assist you.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Predrag
Top achievements
Rank 1
answered on 26 Dec 2011, 02:07 PM

Hi Tina,

Sorry for late response.

I tried changed style like you explained (even copied your style), but with no success (control never apply those validation styles). I did similar thing for RadComboBox and it works, maybe I am missing something here, but I didn’t have more time to go dipper into problem.  

0
Zarko
Telerik team
answered on 29 Dec 2011, 10:48 AM
Hi,
I think that the best way to achieve the validation functionality is to create your own DropDownButton by inheriting ours and then add an IsValid property on which change you'll set the correct VisualState.
I've created a sample project with a DataForm, TreeViews and DropDownButtons so could you please examine it and see if this is what you're looking for? In the TreeView you'll see Items and Invalid Items and if you select an Invalid Item the dropdownbutton should become red and if you focus it it's error tooltip should appear.
If you have more questions please feel free to ask.

Greetings,
Zarko
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Brian Chung
Top achievements
Rank 1
answered on 05 Mar 2015, 10:50 AM
Hi Tina and Zarko,

Is it possible that you can attach the RadDropDown button controltemplate xaml in file to me? I can't open it up RadDropDown button with my Blend 4 as you show on the 

http://www.telerik.com/help/silverlight/radbuttons-styles-and-templates-template-structures.html

Thank you!
0
Pavel R. Pavlov
Telerik team
answered on 09 Mar 2015, 01:22 PM
Hi Brian,

You can find the default ControlTemplates of our controls in your installation directory. For more information on that matter please refer to our Editing Control Templates article.

Do not hesitate to contact us if you have any other questions.

Regards,
Pavel R. Pavlov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Buttons
Asked by
Predrag
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Predrag
Top achievements
Rank 1
Zarko
Telerik team
Brian Chung
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or