Hello Telerik Team,
I have a requirement where I need to open bunch of( number varies based on items availability) same radwindows as modal windows where user inputs the data on each of the windows and close it to get to the next window, I need to refresh the parent page once the user is done inputting data on all the modal windows, I have a javascript function the needs to be called upon clientclose(which is going to be same for all the modal windows) where I check the number of windows active, if the active count is zero that's when I refresh the parent page, it looks like the javascript function is not attached to each instance of the modal window, but it is attached to the first instance that I see on the screen. here is my code, please let me know why the event is not attached to each of the modal windows.
Thanks in advance,
SC.
I have a requirement where I need to open bunch of( number varies based on items availability) same radwindows as modal windows where user inputs the data on each of the windows and close it to get to the next window, I need to refresh the parent page once the user is done inputting data on all the modal windows, I have a javascript function the needs to be called upon clientclose(which is going to be same for all the modal windows) where I check the number of windows active, if the active count is zero that's when I refresh the parent page, it looks like the javascript function is not attached to each instance of the modal window, but it is attached to the first instance that I see on the screen. here is my code, please let me know why the event is not attached to each of the modal windows.
Thanks in advance,
SC.
function OnClientclose(sender, eventArgs) {
var manager = GetRadWindowManager();
var windows = manager.get_windows();
if(windows.length==0)
{
//refresh parent page
}
}
-----------------------------------------------------------------
//from my code behind
string[] strInputIDs = args1[1].Split(',');
for (int i = 0; i < strInputIDs.Length; i++)
{
RadWindow window = new RadWindow();
window.ID = "RadWindow" + i;
window.NavigateUrl = "Popup.aspx?ID=" + Convert.ToInt32(strInputIDs[i]) + "&Result=S";
window.VisibleOnPageLoad = true;
window.Modal = true;
window.Width = 550;
window.Height = 300;
window.OnClientClose = "OnClientclose";
RadWindowManager1.Windows.Add(window);
}