RadDatePicker Client ID in a complex scenario

2 posts, 0 answers
  1. Yash
    Yash avatar
    27 posts
    Member since:
    Sep 2010

    Posted 04 May 2011 Link to this post

    This is a complex scenario which I will try to explain as good as I can.
    I have a Master Page(MasterPage1) and their is another MasterPage(MasterPage2) inherited from the MasterPage1.
    So in MasterPage2, I have a RadDatePicker which is inside a RadPageView which is inside a RadPanelBar.

    Now, i want the ClientID of this RadDatePicker. Presently I am trying it using $find(<%= id_radDatePicker.ClientID%>), which says that id_radDatePicker doesnt exist in the scenario.

    I would appreciate if you can let me know how to get around with this.

  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 May 2011 Link to this post

    Hello Yash,

    One suggestion is to attach either DateInput-ClientEvents-OnLoad or Calendar-ClientEvents-OnLoad and which is having the default argument sender. With this sender you can extract the RadDatepickerID.
    <telerik:RadDatePicker EnableScreenBoundaryDetection="true" runat="server" Calendar-ClientEvents-OnLoad="OnLoad" ID="RadDatePicer1">

    function OnLoad(sender)
           sender.get_id();//you will get the ID of the Calender control which is embed in RadDatePicker. Now you can retrieve the ID by spiting the ID that we get

Back to Top