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

Animate raddcock command item icon

7 Answers 141 Views
Dock
This is a migrated thread and some comments may be shown as answers.
prayag ganoje
Top achievements
Rank 1
prayag ganoje asked on 02 May 2011, 11:15 PM
Hello,

I have raddock inwhich usercontrols are loaded dynamically. On clicking the link button in the usercontrol data refreshes.

I want to animate (replace icon with some gif file till the time page is refreshing) the raddock itemcontent image while page is refreshing. Plz see attached image.

Can you plz suggest me that how can achieve this ?

7 Answers, 1 is accepted

Sort by
0
Accepted
Pero
Telerik team
answered on 04 May 2011, 03:36 PM
Hi Prayag,

There is no built-in functionality of the RadDock control that replaces the image of a given command while the page is loading. This however can be easily achieved with a bit of custom code. For your convenience I created a sample project, that replaces the image of the command when the button is clicked, and returns the original image when the page is loaded.

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
prayag ganoje
Top achievements
Rank 1
answered on 04 May 2011, 08:51 PM
Hello,

Thanks for the sample project. It was nice.

One more challenge is the raddock are also created dynamically. And link button is located inside the user control. How to get it parent raddock id in javascript on link button click ?

0
Pero
Telerik team
answered on 09 May 2011, 11:40 AM
Hi Prayag,

In the code behind of the User Control loaded within the dock, use the Parent property (Me.Parent or this.Parent) to get a reference to the parent RadDock control (keep in mind that the dock might not be a direct parent) and get its ClientID property. After you have the ClientID of the dock you could pass it to the Click function as an argument.

Best wishes,
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
prayag ganoje
Top achievements
Rank 1
answered on 11 May 2011, 09:53 PM
Hello,

Thanks for the snipet. It worked for me but with ** mark.

This javascript invokes after 2 button click and not immidiately. I follwoed the same as given in the code snipet.

Could not figure out why script is not triggering in the first button click and why in the third click always.
0
Pero
Telerik team
answered on 12 May 2011, 09:39 AM
Hello Prayag,

I tested the code locally and is working in all the cases. I attached my test project to the thread. Please run it and see that it works.
If the problem persists please send us a sample application that shows the issue, and we will do our best to help.

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
ramez
Top achievements
Rank 1
answered on 27 May 2011, 06:18 PM
hello Admin,

quick question, is possible to have Docks inside a Dock

lets say one Dock will be a section, and inside that section there will be multiple docks representing Items.

Section can be Hardware parts and inside that section there is another  docks that are , CPU, Ram, Power Supply .....
taking in mind that we can drag sections within their fields, and we can drag parts within a section.

thanks in advance.

0
Pero
Telerik team
answered on 30 May 2011, 11:04 AM
Hi Ramez,

Yes, you can nest RadDock controls one within another. What you need to do is, place a RadDockZone within the desired parent dock, and then you would be able to dock other RadDock objects within this zone. Note that you should apply the following CSS to the page, because the layout of the nested docks will be broken (they inherit some CSS from their parent docks).
<style type="text/css">
    .RadDock .rdTitleBar
    {
        height: 27px;
    }
</style>

Here is an example showing this scenarios:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
    <style type="text/css">
        .RadDock .rdTitleBar
        {
            height: 27px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="RadScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <telerik:RadDockLayout ID="RadDockLayout1" runat="server">
            <telerik:RadDockZone ID="RadDockZone1" runat="server" MinHeight="300px" Width="300px">
                <telerik:RadDock ID="RadDock1" runat="server" Title="RadDock-Title" Width="300px"
                    Height="300px">
                    <ContentTemplate>
                        <telerik:RadDockZone ID="RadDockZone2" runat="server" MinHeight="300px">
                        </telerik:RadDockZone>
                    </ContentTemplate>
                </telerik:RadDock>
                <telerik:RadDock ID="RadDock2" runat="server" Title="RadDock-Title" Width="300px"
                    Height="300px">
                    <ContentTemplate>
                    </ContentTemplate>
                </telerik:RadDock>
            </telerik:RadDockZone>
        </telerik:RadDockLayout>
    </div>
    </form>
</body>
</html>


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.

Tags
Dock
Asked by
prayag ganoje
Top achievements
Rank 1
Answers by
Pero
Telerik team
prayag ganoje
Top achievements
Rank 1
ramez
Top achievements
Rank 1
Share this question
or