Not able to set radmaskedtextbox FocusedStyle-CssClass and DisabledStyle-CssClass

2 posts, 0 answers
  1. Dipta
    Dipta avatar
    7 posts
    Member since:
    Apr 2011

    Posted 14 Mar 2012 Link to this post

     i am trying to set the radmaskedtextbox FocusedStyle-CssClass and DisabledStyle-CssClass by gisving Cssclass name but they are not  reflecting into UI means not setting.Example like

    .change

     {

    background-color:Green;

      }

    .setback

    {

    background-color:Orange;

     }

    for Focus style:

    <telerik:radmaskedtextbox ID="radmaskedtextbox1" Text="123" FocusedStyle-CssClass="change"  Mask="Test" EnableEmbeddedSkins="false" runat="server">

    </telerik:radmaskedtextbox>

    For disable style:

    <telerik:radmaskedtextbox ID="radmaskedtextbox1" Text="123" Enabled="false" FocusedStyle-CssClass="change" DisabledStyle-CssClass="disable" Mask="Test" EnableEmbeddedSkins="false" runat="server">

    </telerik:radmaskedtextbox>

    But thsose styles are not applying
    Please share your comments reagrding this and provide some sample code for better understanding.
    Any help will be great appreciated.

    Thanks,
    Dipta





     

     

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Mar 2012 Link to this post

    Hi Dipta,

    Try setting !important modifier to override the default style as follows.
    CSS:
    <style type="text/css">
      .change
        {
          background-color:Green !important;
        }
      .disable
        {
          background-color:Orange !important;
        }
    </style>

    ASPX:
    <telerik:RadMaskedTextBox ID="radmaskedtextbox4" runat="server" FocusedStyle-CssClass="change" ................ >
    </telerik:RadMaskedTextBox>
    <telerik:RadMaskedTextBox ID="radmaskedtextbox3" Text="123" Enabled="false" DisabledStyle-CssClass="disable" runat="server" ...........>
    </telerik:RadMaskedTextBox>
    Hope you are able to accomplish what you need with the sample.

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top