Styling template of RadCombobox

7 posts, 1 answers
  1. david
    david avatar
    18 posts
    Member since:
    Jan 2009

    Posted 30 Jan 2009 Link to this post

    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
  2. Answer
    Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 30 Jan 2009 Link to this post

    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.
  3. DevCraft banner
  4. david
    david avatar
    18 posts
    Member since:
    Jan 2009

    Posted 30 Jan 2009 Link to this post

    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
  5. david
    david avatar
    18 posts
    Member since:
    Jan 2009

    Posted 30 Jan 2009 Link to this post

    Nevermind I found the solution to it already.
    David
  6. Valeri Hristov
    Admin
    Valeri Hristov avatar
    2252 posts

    Posted 30 Jan 2009 Link to this post

    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.
  7. Chris Evans
    Chris Evans avatar
    19 posts
    Member since:
    Feb 2010

    Posted 01 Apr 2010 Link to this post

    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
  8. Pana
    Admin
    Pana avatar
    748 posts

    Posted 07 Apr 2010 Link to this post

    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.
Back to Top
DevCraft banner