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

2 posts, 0 answers
  1. Andrew Paulson
    Andrew Paulson avatar
    11 posts
    Member since:
    Jul 2004

    Posted 16 Mar 2012 Link to this post

    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.

  2. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 20 Mar 2012 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top