Animate raddcock command item icon

8 posts, 1 answers
  1. prayag ganoje
    prayag ganoje avatar
    127 posts
    Member since:
    Feb 2010

    Posted 02 May 2011 Link to this post

    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 ?
  2. Answer
    Pero
    Admin
    Pero avatar
    1156 posts

    Posted 04 May 2011 Link to this post

    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.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. prayag ganoje
    prayag ganoje avatar
    127 posts
    Member since:
    Feb 2010

    Posted 04 May 2011 Link to this post

    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 ?

  5. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 09 May 2011 Link to this post

    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.

  6. prayag ganoje
    prayag ganoje avatar
    127 posts
    Member since:
    Feb 2010

    Posted 11 May 2011 Link to this post

    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.
  7. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 12 May 2011 Link to this post

    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.

  8. ramez
    ramez avatar
    1 posts
    Member since:
    Feb 2011

    Posted 27 May 2011 Link to this post

    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.

  9. Pero
    Admin
    Pero avatar
    1156 posts

    Posted 30 May 2011 Link to this post

    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.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017