This is a migrated thread and some comments may be shown as answers.

As knowing that RadDock is selected

6 Answers 75 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Wilson
Top achievements
Rank 1
Wilson asked on 29 Jun 2011, 12:25 AM
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

6 Answers, 1 is accepted

Sort by
0
Pero
Telerik team
answered on 01 Jul 2011, 03:16 PM
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.

0
harish
Top achievements
Rank 1
answered on 15 Jul 2011, 10:42 AM
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?

0
Rich Coleman
Top achievements
Rank 1
answered on 12 Sep 2011, 10:16 PM
@Wilson,  I'm looking to do the same thing.  Did you ever find a solution for this?
0
harish
Top achievements
Rank 1
answered on 13 Sep 2011, 04:06 AM
 //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);
            }
0
Rich Coleman
Top achievements
Rank 1
answered on 13 Sep 2011, 01:59 PM
@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".
0
Slav
Telerik team
answered on 15 Sep 2011, 08:59 AM
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
Tags
Dock
Asked by
Wilson
Top achievements
Rank 1
Answers by
Pero
Telerik team
harish
Top achievements
Rank 1
Rich Coleman
Top achievements
Rank 1
Slav
Telerik team
Share this question
or