Mapping control objects telerik from javascript file external

2 posts, 0 answers
  1. Cesar
    Cesar avatar
    3 posts
    Member since:
    Oct 2013

    Posted 30 Jul 2015 Link to this post

    From 2 monts ago i´ve developing with this framework or suite package telerik, while i was program some aspx pages i founded some stop times for get or mapping the radcontrols from javascript file my great reason for write this post !! 

    for mapping a control on our javascript we have put the next propertie ClientMode="Static" like

    <telerik:RadTimePicker ClientIDMode="Static" DateInput-DateFormat="HH:mm:ss" Style="position:absolute; top:220px; left:500px" ID="_dtpMonthlyHour"  runat="server">
      </telerik:RadTimePicker>

     

    and our javascript file mike this //.

    var _dtpMonthlyHour=$telerik.findDatePicker("_dtpMonthlyHour");

    with this line of code we can get all we want about this radControl !!

  2. Vessy
    Admin
    Vessy avatar
    1389 posts

    Posted 03 Aug 2015 Link to this post

    Hi Cesar,

    It is recommends by Microsoft to use ClientIDMode set to Static only for static controls.The RadControls on the other hand are controls with complex hierarchies of child controls and templates so setting their ClientIDMode property to Static will break their functionality. What I would recommend is that you do not use ClientIDMode Static for any Telerik controls.

    You can use the approach used in our Live demos in order to access a specific control's ID from an external JavaScript file. For example you can review the source code of the following demos:
    http://demos.telerik.com/aspnet-ajax/splitter/examples/overview/defaultcs.aspx
    http://demos.telerik.com/aspnet-ajax/progress-bar/overview/defaultcs.aspx
    etc.

    Regards,
    Vessy
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top