Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
190
Infragistics webtexteditor cssClass change on some radio button selection
posted

Hi, 

How we can change the cssClass for an element WebTextEditor while change some radio button selction 

here is the code 

<igtxt:WebTextEditor runAt="server" cssClass="AminReadOnly" ID="txtBuyerAccount" ReadOnly="true" Width="150px">
</igtxt:WebTextEditor>

On some radio button click blow function is being called... 

function OnRadioButton_Click(ID)
{
    var bAccount=document.getElementById('<%=txtBuyerAccount.ClientID%>');
   
    bAccount.get_element().className="AdminTextBox";

}

but its not working and chaning the webtexteditor class name changing at run time. 

Parents
No Data
Reply
  • 1320
    Offline posted

    Hello Muhammad,

    After investigating this further, I determined that your requirement could be achieved by using the jQuery method “addClass”. The instance of the editor is wrapped as a jQuery element, in order to use the “addClass” method:

    function radioButton()

    {

       var editor = $find('<%=WebTextEditor1.ClientID%>');

       $(editor.get_element()).addClass("AdminTextBox");

    }

    Below I am attaching a sample, demonstrating the described behavior. Please let me know if you need any further information regarding this matter.

    Regards,

    Monika Kirkova,

    Infragistics

    WebTextEditorCssClass.zip

Children