Hi Ryan,
If you debug the ValueChanged function, you can see that the "sender" is TextBox object, not Input object. So the CSS selector will be .RadInput .riTextBox.custom3 {}.
The other approach is to set the class name in a similar way as in the first solution:
Please, keep in mind, that if you do not use jQuery "addClass()", it is necessary to do verification if the class has not already been added. Otherwise the class will be added every time when the ValueChanged function is fired.
Regards,
Magdalena
Telerik
If you debug the ValueChanged function, you can see that the "sender" is TextBox object, not Input object. So the CSS selector will be .RadInput .riTextBox.custom3 {}.
The other approach is to set the class name in a similar way as in the first solution:
function
ValueChanged(sender, eventArgs)
{
var
inputElement = sender.get_element();
inputElement.className += inputElement.className +
" custom"
;
}
Please, keep in mind, that if you do not use jQuery "addClass()", it is necessary to do verification if the class has not already been added. Otherwise the class will be added every time when the ValueChanged function is fired.
Regards,
Magdalena
Telerik
See What's Next in App Development. Register for TelerikNEXT.