Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Docking > Javascript Access Inside Dock
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Javascript Access Inside Dock

Feed from this thread
  • Ryan Grossman Intermediate avatar

    Posted on Nov 12, 2009 (permalink)

    I'm using the following to toggle the date popup, but it doesnt work when I place the control inside a dock.

      function ToggleDatePopup()
      {
       <%= clnListingOnMarketDate.ClientID %>.ShowPopup();
      }

    <radCln:RadDatePicker ID="clnCommunicationCreatedDateS" Width="80" Skin="Vista"
                runat="server">
                                              <DatePopupButton Visible="False"></DatePopupButton>
                                              <DateInput onclick="ToggleDatePopup()" skin="office2007" height="10px" DateFormat="MM/dd/yyyy" > </DateInput>
          </radCln:RadDatePicker>


    What has to be changed to allow this to work inside a dock?

  • Pero Pero admin's avatar

    Posted on Nov 17, 2009 (permalink)

    Hello Ryan,

    I tested the code (with modifications) and it works when placed inside a RadDock. Please test the attached project.

    To get a reference to the client-side object of the RadDatePicker control you need to use the following JavaScript line:

    var objDatePicker = $find("<%= clnCommunicationCreatedDate.ClientID %>");
    You should wrap the client-side code when "<%= clnCommunicationCreatedDate.ClientID %>" is used to get the ClientId of any RadControl.

    Also the method there is no ShowPopup() client-side method - there is showPopup().

    PS. Here is a common problem that has been reported by other customers, when placing RadCalendar and RadDatePicker inside dynamically created RadDocks.


    Greetings,
    Pero
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Attached files

  • Ryan Grossman Intermediate avatar

    Posted on Nov 24, 2009 (permalink)

    I'm not using a user control. My calendar date input box is placed directly inside the dock, then outside the dock below the header section on the page I put your code but I get:

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

    Compiler Error Message: BC30451: Name 'clnCallbackDate' is not declared.

    Source Error:

    Line 980:        function ToggleDatePopup()
    Line 981:        {
    Line 982: $find("<%= clnCallbackDate.ClientID %>").showPopup();Line 983:        }
    Line 984:

  • Pero Pero admin's avatar

    Posted on Nov 27, 2009 (permalink)

    Hello Ryan,

    The clnCallbackDate is the ID of the RadDatePicker. Please make sure that the ID used in the JavaScript function matches the ID of the RadDatePicker.

    If this does not help, please send a running sample project where the issue can be reproduced.

    Kind regards,
    Pero
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.

  • Ryan Grossman Intermediate avatar

    Posted on Dec 11, 2009 (permalink)

    I got the calendar working with the following:

        <script type="text/javascript">
            function ToggleDatePopupCallback()
            {
                <%=rdoMyCallback.FindControl("clnCallbackDate").ClientID %>.ShowPopup();
            }

        </script>



    I have an issue with refreshing my grid though. I use the following to refresh the grid from radwindow...

             function CallFunctionOnParentPage(fnName)
             {
                var oWindow = GetRadWindow();
                if (oWindow.BrowserWindow[fnName] && typeof(oWindow.BrowserWindow[fnName]) == "function")
                {
                   oWindow.BrowserWindow[fnName](oWindow);
                }
       GetRadWindow().Close();
             }


    It calls the following function:

       function refreshGridCommunication(arg)
                {
         window["<%=rdoCommunication.FindControl("dgCommunication").ClientID %>"].AjaxRequest('<%=rdoCommunication.FindControl("dgCommunication").ClientID %>', 'Rebind');
                }


    I checked the source and it is populating information for the radgrid client id within the dock but when I try to refresh, even manually with <a href="#" onClick="return refreshGridCommunication();">Refresh Data</a>  it does nothing...

  • Ryan Grossman Intermediate avatar

    Posted on Dec 11, 2009 (permalink)

    Ignore my last question. I had the grid wrapped in an ajax panel and enableajax in the grid itself was disabled. I enabled that and it works as it should...

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Docking > Javascript Access Inside Dock