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

$telerik VS Sys.Componet.find() or $find()

1 Answer 364 Views
Documentation and Tutorials
This is a migrated thread and some comments may be shown as answers.
Andrew Paulson
Top achievements
Rank 2
Andrew Paulson asked on 16 Mar 2012, 03:37 PM
I've noticed after updating several sites to the newest hot fix version, and adjusting the Script Manager on the page to include the telerik's Jquery core Module. that $telerik is alot cleaner, easier to use and just generally better than the methods used in the tutorials and help files (eg. $find('Controlname');)

is there a reason we shouldn't be using the $telerik, are there situations where one shouldn't concisder this (like where Jquery isn't loaded or used) i'm at a loss for other situations where it's use would cuase issues.

I understand it takes time to update documentation. that's not really the point.

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 20 Mar 2012, 02:38 PM
Hello Andrew,

The method $find provides a shortcut to the Sys.Application.findComponent() method, which returns the specified Component object. Expect to use this method every time you reference a RadControl on the client as it returns a client-side object that represents the control and allows managing it while avoiding unnecessary postbacks. Also, it is a ASP.NET AJAX method and it is specific for the RadControls as they are built on top of this framework.

The alias $telerik is used for accessing the jQuery javascript library, included in the Telerik.Web.UI assembly, as you can check in this help article. While it is also possible to access the client-side object of a RadControl, this is not the main purpose of the jQuery library and as you can check in the following code sample, the alternative of $find is not so intuitive to use:
$telerik.$('#RadButton1').each(function () { this.control.set_text("Button"); });

I hope this helps. Feel free to contact us again if there are details that are not clarified by the information above.

Regards,
Slav
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
Documentation and Tutorials
Asked by
Andrew Paulson
Top achievements
Rank 2
Answers by
Slav
Telerik team
Share this question
or