RadDock "Prometheus" with RadWindow

7 posts, 0 answers
  1. Telerik Admin
    Telerik Admin avatar
    1679 posts
    Member since:
    Oct 2004

    Posted 23 May 2007 Link to this post

    Requirements

    RadControls version

    RadDock Prometheus Beta, RadWindow 1.8.x
    .NET version

    2.x
    Visual Studio version

    2005
    programming language

    C#
    browser support

    all browsers supported by RadControls


     
    PROJECT DESCRIPTION

    The attached project demonstrates how to integrate RadDock Prometheus with RadWindow so that when clicking on a command of RadDock, a window opens. Upon closing the window the RadDock command that opened the window forces a postback and its Command event in code-behind is handled.

  2. ashish
    ashish avatar
    28 posts
    Member since:
    Jun 2012

    Posted 06 Oct 2007 Link to this post

    How do I send parameters from the raddock ?

    I want to -

    1. Open a different url depending on which dock the window is called from
    2. I want to be able to supply querystring parametrs to the url.

  3. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 09 Oct 2007 Link to this post

    Hello ashish,

    In the Javascript function provided in this example:
    function OpenMasterBoxEditor(sender, args)
            {
                var oWnd = window.radopen(null, "RadWindow1");
                oWnd.Argument = sender.get_parent();
                return false;
            }

    sender will give you a reference to the dock which called the command - you can use it to check for the dock's ID and execute your  code depending on it.
    You can also build the querystring directly in the Javascript function, in the radopen() command
    e.g:
    var oWnd = window.radopen("mypage.aspx?arg=myarg", "RadWindow1");




    Best wishes,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  4. ashish
    ashish avatar
    28 posts
    Member since:
    Jun 2012

    Posted 14 Oct 2007 Link to this post

    Unfortunately, I cannot use the dock ID. I need to open a user control depending on the user control that has been loaded in the dock in question. I also need to pass some other information to generate a query string.

    Basically, I need to pass this information as a parameter to the javascript target of the onclientCommand.

    I could not find any information about the methods and properties exposed by the sender and args parameters of the onClientCommand. Can you point me to a place when I can get that info?
  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 16 Oct 2007 Link to this post

    Hi ashish,

    I see that you have already found this forum thread: http://www.telerik.com/community/forums/thread/b311D-hmtkd.aspx.

    If you encounter any other problems, please use the support ticketing system to send us a project which reproduces them and we will do our best to help.




    Best wishes,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. ashish
    ashish avatar
    28 posts
    Member since:
    Jun 2012

    Posted 16 Oct 2007 Link to this post

    Yes, I did find that thread. Thanks.

    I do have a further question though.. How do I modify the command text from client side ? Basically I have dropdowns on the main page, that I use as parameters. I want to now send the current value of the drop down as a parameter to the radwindow. So each time the dropdown selected index changes I want the command text to reflect that. So the next time someone clicks on the command button it will open the radwindow and load the user control with the selected parameter
  7. Petya
    Admin
    Petya avatar
    869 posts

    Posted 18 Oct 2007 Link to this post

    Hi ashish,

    Here is how to change the command's tooltip on the client:

    <telerik:raddocklayout id="RadDockLayout1" runat="server">
                <telerik:raddockzone id="RadDockZone1" runat="server" minheight="200" style="float: left;
                    margin-right: 20px;" width="300">
                    <telerik:raddock id="RadDock1" runat="server" title="RadDock1">
                        <commands>
                            <telerik:dockexpandcollapsecommand />
                            <telerik:dockcommand cssclass="MyCustomStyle" name="help"/>
                        </commands>
                    </telerik:raddock>
                </telerik:raddockzone>
            </telerik:raddocklayout>
           
            <input type="button" value="change text" onclick="changeCommandText()" />
            <script type="text/javascript">
            function changeCommandText()
            {
                var dock = $find("RadDock1");
                dock.getCommand("help").get_element().title = "new";
            }
            </script>

    Hope this helps.

    Kind regards,
    Petya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top