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

Styling template of RadCombobox

6 Answers 408 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
david
Top achievements
Rank 1
david asked on 30 Jan 2009, 11:02 AM
Hi,

I have extracted the combobox.xaml from Telerik.Windows.Controls.Input.dll, because I want to override the NonEditableComboBoxTemplate for RadCombobox and then use it. The problem is, when I change the template, copy it in Application.Resources and then use the template in a style (also defined in Application.Resources ) I get a blank screen.
If I use the same style without the template the application works well (but of course without applying my NonEditableComboBoxTemplate)
Is the template property of RadCombobox kind of readonly?

Thanks,
David

6 Answers, 1 is accepted

Sort by
0
Accepted
Valeri Hristov
Telerik team
answered on 30 Jan 2009, 11:08 AM
Hello David,

The Template property of RadComboBox can be set, but the control later overwrites its value with the template from its theme, depending on the value of the IsEditable property. To change the control templates you need to define a theme and modify the templates in the theme. Check the attached project for more details.

Best wishes,
Valeri Hristov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
david
Top achievements
Rank 1
answered on 30 Jan 2009, 12:18 PM
Thanks, now it is clear to me.

Though I have another question about your solution:
If I have 150 RadComboBoxes, so I have to specify for each one the theme like in your solution, or is there another option how to set a specific theme to all RadComboboxes at once?

I found out that defining a custom style for RadControl like this:

<Style TargetType="telerikInput:RadComboBox">
...
</Style>
does not have effect as this style is overwriten by yours, right?

David
0
david
Top achievements
Rank 1
answered on 30 Jan 2009, 03:20 PM
Nevermind I found the solution to it already.
David
0
Valeri Hristov
Telerik team
answered on 30 Jan 2009, 04:51 PM
Hi David,

I am glad that you managed to resolve the problem without our help.

However, I should note that when you edit a forum post or a support ticket we don't get notified and we cannot answer again if you have questions. I would recommend sending a new post, instead of editing an old post when you have additional questions, in order to provide us with proper notification, in order to provide you with answer :)

Greetings,
Valeri Hristov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Chris Evans
Top achievements
Rank 1
answered on 01 Apr 2010, 04:21 PM
I am attempting to appy the default theme for the radcombobox that you provideed here so I can edit it slightly. but when loading the page with the radcombo an the theme attached I get 'AG_E_PARSER_BAD_PROPERTY_VALUE [Line: xxx Position: xx]'  even when just trying to run your sample project I get the same error.  Could you perhaps help find out the cause of this? Thanks
0
Pana
Telerik team
answered on 07 Apr 2010, 06:51 AM
Hello Chris,

I'm attaching the version of the combobox for 2010.Q1. I hope the project would help you style the ComboBox.

Regards,
Panayot
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
ComboBox
Asked by
david
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
david
Top achievements
Rank 1
Chris Evans
Top achievements
Rank 1
Pana
Telerik team
Share this question
or