Hi ,
What is the equivalent of className property in telerik controls.I want to update the css based on client click using javascript.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
function AssignValue() {
var rdtb1 = document.getElementById('<%#rdtb1.ClientID%>');
rdtb1.className = "red_bgd";
rdtb1.skin = "red_bgd";
}
</script>
<style type="text/css">
.red_bgd{
background-color:#F8E5E5;
color:#A90000;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadTextBox ID="rdtb1" Runat="server" EnableEmbeddedSkins="false" >
</telerik:RadTextBox>
<br />
<br />
<asp:Button ID="btnFillRdTb" runat="server" Text="FillTextBox" onClientClick="AssignValue()" />
</div>
</form>
</body>
</html>
What is the equivalent of className property in telerik controls.I want to update the css based on client click using javascript.
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" language="javascript">
function AssignValue() {
var rdtb1 = document.getElementById('<%#rdtb1.ClientID%>');
rdtb1.className = "red_bgd";
rdtb1.skin = "red_bgd";
}
</script>
<style type="text/css">
.red_bgd{
background-color:#F8E5E5;
color:#A90000;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<telerik:RadTextBox ID="rdtb1" Runat="server" EnableEmbeddedSkins="false" >
</telerik:RadTextBox>
<br />
<br />
<asp:Button ID="btnFillRdTb" runat="server" Text="FillTextBox" onClientClick="AssignValue()" />
</div>
</form>
</body>
</html>