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

Dynamic style attribute

1 Answer 37 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sami
Top achievements
Rank 1
Sami asked on 27 Apr 2015, 12:54 AM

Dear,

How to apply dynamic style attribute written by user (who is familiar with css) for dynamic Telerik controls?

Like:

RadTextBox1..Attributes.Add("style", "width:100%");

 

Thanking you,

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 29 Apr 2015, 04:25 PM
Hello,

In order to set 100% width for the textbox you need to override the control's inline width style with CSS rules using the !important clause as shown below:
RadTextBox1.WrapperCssClass = "CustomClass";
<style type="text/css">
           .CustomClass
           {
               width: 100% !important;
           }
       </style>

Regards,
Pavlina
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
General Discussions
Asked by
Sami
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or