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

Changing NavigateURL and reopening radwindow not working.

2 Answers 202 Views
Window
This is a migrated thread and some comments may be shown as answers.
Clint Leonard
Top achievements
Rank 1
Clint Leonard asked on 04 Jan 2011, 11:08 PM
Hello all.  I am having an issue with a radwindow that I haven't seen here.  It's probably something simple that I need to do, but cannot seem to figure it out.

My issue is this:

I have A radwindow

<telerik:RadWindow runat="server" ShowContentDuringLoad="False" ReloadOnShow="true" Title="Trend Report - Select Scope Objects"
    AutoSize="false" ID="RadWindowAddTrendScopeObjects" Width="500px" Height="445px" Modal="true"
    OnClientClose="OnClientCloseAddTrendScopeObjectsWindow" Behavior="Default" InitialBehaviors="None"
    Behaviors="Close,Move" DestroyOnClose="true">
</telerik:RadWindow>

I initialize the NavigateURL on page load as follows:
assessmentID = new Guid(ddlDataSource.SelectedValue);
RadWindowAddScopeObjects.NavigateUrl = addScopeURL + assessmentID.ToString() + "&LinkID1=" + cachedUser.User.UserID.ToString();                

I open it using a lnk button and the javascript below and it works like a charm

 

<asp:LinkButton ID="lnkBtnTrendSelectScopeItems" runat="server" Text="Click Here"

 

 

OnClientClick="openAddTrendScopeObjectsWindow(); return false;"></asp:LinkButton>

 

(Javascript below)



function
openAddTrendScopeObjectsWindow() {

 

 

var oWnd = $find("<%= RadWindowAddTrendScopeObjects.ClientID %>");

 

oWnd.show();

}


The problem happens when I try to modify the navigateURL and then reopen the radwindow
protected void ddlTrendAssessmentBasedScope_SelectedIndexChanged(object sender, EventArgs e)
{
    trendAssessmentID = new Guid(ddlTrendAssessmentBasedScope.SelectedValue);
    RadWindowAddTrendScopeObjects.NavigateUrl = addScopeURL + trendAssessmentID.ToString() + "&LinkID1=" + cachedUser.User.UserID.ToString();
}
If I change the dropdown, thus triggering the above code and changing the NavigateURL (verified in debug), then again clicking the lnkbutton lnkBtnTrendSelectScopeItems, the radWindow opens again with the orginal URL still in place.

Thanks in advance for your help!
Clint

2 Answers, 1 is accepted

Sort by
0
Clint Leonard
Top achievements
Rank 1
answered on 05 Jan 2011, 11:53 PM
Found the problem.  I had placed the radwindow outside my radajaxpanel, and so it was not being refreshed.

One I placed it within the panel, everything is working.

I hope this helps someone else in the future!
0
Dave
Top achievements
Rank 1
answered on 18 Nov 2013, 03:20 PM
This is the future speaking....yes it helped, same exact scenario. 

Thanks.
Tags
Window
Asked by
Clint Leonard
Top achievements
Rank 1
Answers by
Clint Leonard
Top achievements
Rank 1
Dave
Top achievements
Rank 1
Share this question
or