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

need to open a new instance of a window.

2 Answers 276 Views
Window
This is a migrated thread and some comments may be shown as answers.
Pooja
Top achievements
Rank 1
Pooja asked on 17 Jul 2012, 10:31 AM
I have a kendo Window with an order entry screen at the time of page load. At the bottom , i have a dock menu. On the click of the dock menu the same window comes to the front, but a new instance is not created. the code is as below.
window at page load:
<div id="window" style="width: 1200px;">
               <span class="Orders">
                    <div id="Workspace">
                        <div id="tabstrip" style="width: 1200px; height: 260px;">
                        <ul>
                            <li class="k-state-active">Equity </li>
                            <li>Futures </li>
                            <li>Options </li>
                            <li>CFD </li>
                            <li>Forex </li>
                        </ul>
                        <div>
                            <span class="Equity">
            </span>
        </div>
    </div>
</div>
</span>
</div>

the new instance of this window should open up on a click of button which is as below
function OpenOrderEntry() {
            var window = $("#window")
            if (!window.data("kendoWindow")) {
                // window not yet initialized
                window.kendoWindow({
                    width: "1300px",
                    height: "280px",
                    modal: false,
                    resizable: true,
                    actions: ["Minimize", "Maximize", "Close"],
                    title: "OrderEntry"
                });
            } else {
                // reopening window
                window.data("kendoWindow")
            .open(); // open the window
            }
        }

i need some help as i need multiple instances of the same window.

2 Answers, 1 is accepted

Sort by
0
Alex Gyoshev
Telerik team
answered on 20 Jul 2012, 07:06 AM

<div class="window-prototype"> ... </div>

function OpenOrderEntry() {

     var dialog = $(".window-prototype").clone().kendoWindow({
            width: "1300px",
            height: "280px",
            modal: false,
            resizable: true,
            actions: ["Minimize", "Maximize", "Close"],
            title: "OrderEntry"
         }).data("kendoWindow").open();


By cloning the window content, you create new instances of the HTML that can be used for the new windows.

Kind regards,
Alex Gyoshev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Pooja
Top achievements
Rank 1
answered on 20 Jul 2012, 07:29 AM
Is it possible to change the data being displayed in the cloned window?
Tags
Window
Asked by
Pooja
Top achievements
Rank 1
Answers by
Alex Gyoshev
Telerik team
Pooja
Top achievements
Rank 1
Share this question
or