RadDock handle Client-side Close command

2 posts, 0 answers
  1. Devon
    Devon avatar
    13 posts
    Member since:
    Oct 2010

    Posted 10 Jan 2011 Link to this post

    I'm trying to handle a RadDock close command client side so that I can set some other booleans in javascript, but I can't figure it out. I tried doing:
    <tel:DockCommand OnClientCommand="CloseEmail" />

    then having a javascript function

    function CloseEmail(sender, eventArgs) {
        if (sender.get_dockZoneID() != "") {
            showingEmailDetail = false;

    but that wasn't firing (I put an alert() in there that wasn't showing).
    I also tried using
    <tel:DockCloseCommand OnClientCommand="CloseEmail" />

    but that didn't fire it either. The javascript function is declared globally. Any ideas?
  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 11 Jan 2011 Link to this post

    Hello Devon,

     To attach a handler for the closure of the dock you should not specify it in additional tag (this is used to add commands) but to set the property to your function as shown below:

    <telerik:raddock id="RadDock1" runat="server" 
    <script type="text/javascript">
    function CloseEmail(sender, args)
       if(args.Command.get_name() == "Close")
       //custom close code goes here

    A sample demo where you can see this is available below:


    Kind regards,
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top