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

How to set theme to RadButton in RadGridView

1 Answer 202 Views
Buttons, RadioButton, CheckBox, etc
This is a migrated thread and some comments may be shown as answers.
Ofer
Top achievements
Rank 1
Ofer asked on 25 Jun 2009, 05:52 PM
Hi,

I saved a RadButton theme in an XML file and it's in the project's Resources file.
It's available in the Properties.Resources.RedGridButton class.

I have a RadGrid with a Command Column and I need to set the theme of its default RadButton.
But the grid's CellFormatting event exposes just the buttonElement of the command column.
How to set the button's theme?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 01 Jul 2009, 12:07 PM
Hello Ofer,

Thank you for your question.

Themes can be set only at a control level, but not at an element level. This is the reason why you cannot set a theme for the buttons in the GridViewCommandColumn - because they are RadButtonElements. 

In order to apply a custom style to RadButtonElement in RadGridView you should create themes for RadButton and RadGridView with one and the same ThemeName. Then, when you set the custom ThemeName to RadGridView control, the custom RadButton style will automatically be applied to RadButtonElement. I am attaching a sample project which demonstrates the approach.

If you have additional questions, feel free to contact me.

All the best,
Nikolay
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Buttons, RadioButton, CheckBox, etc
Asked by
Ofer
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or