As knowing that RadDock is selected

7 posts, 0 answers
  1. Wilson
    Wilson avatar
    3 posts
    Member since:
    May 2011

    Posted 28 Jun 2011 Link to this post

    I have a web application where I can dynamically add RadDocks, and I need to know how to identify the dock on which I click, as I can do this else there is no click event, or the selected property.

    Note.
    I have de latest version of controls 

     Thanks
  2. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 01 Jul 2011 Link to this post

    Hello Wilson,

    This functionality is not supported by the RadDock control, and you should implement a custom solution for this purpose. My suggestion is to add a custom command to the RadDock that will select or deselect a dock. Here is a demo showing how to add custom commands to your dock: http://demos.telerik.com/aspnet-ajax/dock/examples/commands/defaultcs.aspx.

    Kind regards,
    Pero
    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. harish
    harish avatar
    2 posts
    Member since:
    May 2011

    Posted 15 Jul 2011 Link to this post

    Hi Pero,

    The link that you gave us teaches us how to create a raddock command. But, I have a query. I create dynamic docks. When I click on a dynamically created dock, I should navigate to a page using response.redirect(). How do I get the click event handler of a dynamically generated dock ???

    My requirement is this :

    I add a dock, say dock A. When I click anywhere on dock A, it should redirect me to an aspx page, say dock A.aspx which I have as part of my solution.  I add 5 dynamic docks, say dock A, dock B, dock C, dock D and dock E. Clicking on those docks should take me to their respective pages. Say, if i click dock D, it should take me to D.aspx.
    I am not able to add any click handlers for dynamically created docks. Is this a bug? If i add a static dock, I just double-click on it in design view and it takes me to code-behind .cs file such as :-

    protected void dockA_click()
    {
    }

    I can easily add response.redirect() method to take me to my desired page. But, it is not possible to add such a line of code when I am creating docks dynamically. Pls provide me a solution fo rmy query because I have been racking my brain for days on this issue. Any working solution is highly appreciated :)  Is my above requirement possible ??? Or is it something that is lacking in raddock control?

  5. Rich Coleman
    Rich Coleman avatar
    19 posts
    Member since:
    Jan 2008

    Posted 12 Sep 2011 Link to this post

    @Wilson,  I'm looking to do the same thing.  Did you ever find a solution for this?
  6. harish
    harish avatar
    2 posts
    Member since:
    May 2011

    Posted 12 Sep 2011 Link to this post

     //When the content area of a dock is clicked, page navigation to the desired location must take place

                function Dock_OnClientInitialize(dock, args) {
                    var dockElem = dock.get_contentContainer();  //get reference to the dock's wrapper element
                    $addHandler(dockElem, "click", function () {
                        switch (dock.get_title())//assign different pages to the docks according their title
                        {
                            case "Alarm Summary":
                                window.location = "AlarmSummary.aspx";
                                break;
                            case "Active Calls":
                                window.location = "ActiveCalls.aspx";
                                break;
                            case "Pending Calls":
                                window.location = "PendingCalls.aspx";
                                break;
                            case "Call Activity for Active Consoles":
                                window.location = "CallActivityForConole.aspx";
                                break;
                            case "Call Activity for Active Dispatchers":
                                window.location = "CallActivityForDispatchr.aspx";
                                break;
                            case "Call Activity for Active Endpoints":
                                window.location = "CallActivityForEndPnt.aspx";
                                break;
                        }
                    }, false);
                }
  7. Rich Coleman
    Rich Coleman avatar
    19 posts
    Member since:
    Jan 2008

    Posted 13 Sep 2011 Link to this post

    @harish - thank you for your reply.  However, Wilson and I were looking for a server-side click event that will cause a postback event to be performed when a user clicks on a dock.  This is basically for  a user to be able to "select" a dock by clicking on it (anywhere on the dock control) so that, via ajax, another control on the same page can load with specific data based on which dock the "select".
  8. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 15 Sep 2011 Link to this post

    Hello Rich,

    Please refer to your support ticket, concerning the requested feature, in which I have suggested a solution for the described scenario.

    When opening support tickets in the future, it is recommended to use a separate one for a particular problem. This will lead to much clear and easy to follow communication and faster responses on the issues at hand. That being said, my suggestion is to continue our discussion in the according support ticket.

    Greetings,
    Slav
    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
UI for ASP.NET Ajax is Ready for VS 2017