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

riTextBox riEnabled is automatic added to class

1 Answer 171 Views
Input
This is a migrated thread and some comments may be shown as answers.
Petar
Top achievements
Rank 1
Petar asked on 04 Apr 2013, 02:42 PM
I am having simple
<telerik:RadTextBox CssClass="Search-Element" ID="txtFirstName" runat="server" Width="100%"></telerik:RadTextBox>

In html output for class i get:
<input type="text" data-propertyname="FirstName" class="riTextBox riEnabled Search-Element" size="20" name="ctl00$ContentPlaceHolder1$ucTest$txtFirstName" id="ctl00_ContentPlaceHolder1_ucTest_txtFirstName">

Why is riTextBox riEnabled added? This makes me problem because i need to get all .Search-Element with JS
$('.Search-Element') is null because that riTextBox riEnabled

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 08 Apr 2013, 11:18 AM
Hello Petar,

Your jQuery selector is not working because hyphen-minus is actually not valid character to be used in your custom class names. The additional "riTextBox riEnabled" classes does not prevent your selector to work. They are used to apply the default CSS for RadInput Control.

Modify your class to "SearchElement" instead of "Search-Element" and it will work correct.

Additionally read this help topic:
http://www.telerik.com/help/aspnet-ajax/input-html-output-css-styling.html

Kind regards,
Vasil
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Input
Asked by
Petar
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or