3 Answers, 1 is accepted
0
Hello Regis,
You could use the approach demonstrated in our demos, which checks if the corresponding kendoWindow data exists.
E.g.
Regards,
Dimiter Madjarov
Telerik
You could use the approach demonstrated in our demos, which checks if the corresponding kendoWindow data exists.
E.g.
var
window = $(
"#window"
);
if
(window.data(
"kendoWindow"
)){
//window is initialized
}
Regards,
Dimiter Madjarov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Regis
Top achievements
Rank 1
answered on 11 Sep 2014, 12:45 PM
Hello Dimiter,
Thanks for your answer. I tried this before but this is not the solution I need (I think).
I may have misspoken.
I have a first window with content. When I click on a button I need to open a second window. But I declare this second window in the first. Then With javascript I load the content of the second window When I click on the button.
Like this :
The problem is my 2nd window always exist.
May I can know if the content is load ?
I wan't to do this because I have a menu that allows me to change the window without having to go in the other previously open window (it is a sequence of form that I need once, but that can be retraced as wanted)
Thanks for all,
Regards,
Thanks for your answer. I tried this before but this is not the solution I need (I think).
I may have misspoken.
I have a first window with content. When I click on a button I need to open a second window. But I declare this second window in the first. Then With javascript I load the content of the second window When I click on the button.
Like this :
@{
Html.Kendo().Window().Name("HeaderFolder")
.Title(@Resources.WindowFolderCreateBody)
.Actions(actions => actions
.Minimize()
.Maximize()
.Close()
)
.Visible(false)
.Modal(true)
.Resizable()
.Draggable(true)
.Width(600)
.Render();
}
<script>
$(
"#HeaderFolderForm"
).click(
function
(e) {
var
wndFolderHeader = $(
"#HeaderFolder"
).data(
"kendoWindow"
);
var
AddressFolder = $(
"#Address-Folder"
).data(
"kendoWindow"
);
if
(wndFolderHeader) {
AddressFolder.close();
wndFolderHeader.refresh({
data: {
FolderID: FolderID,
NextWindow: NextWindow
},
url:
"Folder/HeaderFolder"
,
});
wndFolderHeader.open();
wndFolderHeader.center();
}
else
{
AddressFolder.close();
}
)};
</script>
The problem is my 2nd window always exist.
May I can know if the content is load ?
I wan't to do this because I have a menu that allows me to change the window without having to go in the other previously open window (it is a sequence of form that I need once, but that can be retraced as wanted)
Thanks for all,
Regards,
0
Accepted
Hi Regis,
In order to know when the content of window is loaded, you should bind to the refresh event and execute the custom logic in the event handler.
E.g.
Regards,
Dimiter Madjarov
Telerik
In order to know when the content of window is loaded, you should bind to the refresh event and execute the custom logic in the event handler.
E.g.
.Events(events => events.Refresh(
"onRefresh"
))
Regards,
Dimiter Madjarov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.