I have a bit of a puzzle. I'm using RadWindow to open a window to another site for the purposes of tracking a package (UPS or FEDEX). As a result, the VisibleOnPageLoad parameter is set to false initially, because the URL must be built dynamically based upon the package the user chooses to track (if it CAN be tracked).
Everything works fine up until the point that I actually set TrackWindow.VisibleOnPageLoad = True, at which point the window opens, the URL begins to load, and then the entire PAGE goes to the URL. This, obviously, is not the way it was meant to work, lol. I'm thinking it is just something simple I am overlooking. Hopefully someone can take a look and tell me what's going on, and how to fix it.
Here's the relevant .aspx code;
And here's the vb.net code behind:
Note: I'd prefer NOT to add the window dynamically, unless I absolutely have to.
Everything works fine up until the point that I actually set TrackWindow.VisibleOnPageLoad = True, at which point the window opens, the URL begins to load, and then the entire PAGE goes to the URL. This, obviously, is not the way it was meant to work, lol. I'm thinking it is just something simple I am overlooking. Hopefully someone can take a look and tell me what's going on, and how to fix it.
Here's the relevant .aspx code;
<!-- Windows Begin --> |
<telerik:RadWindowManager ID="TrackWindowManager" runat="server" ShowContentDuringLoad="False"> |
<Windows> |
<telerik:RadWindow runat="server" ID="TrackWindow" VisibleOnPageLoad="false" Title="Help - Datagrid" |
Width="500" Height="500"></telerik:RadWindow> |
</Windows> |
</telerik:RadWindowManager> |
<!-- Windows End --> |
Private Sub rgPoOrders_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles rgPoOrders.SelectedIndexChanged |
Dim TrackNum As String |
Dim TrackURL As String |
Dim TrackPack As New PackageTrack |
Dim selectedItem As GridDataItem = rgPoOrders.SelectedItems(0) |
'Get tracking number and pass to function |
TrackNum = selectedItem(rgPoOrders.MasterTableView.Columns(2)).Text |
'Get URL to track package |
TrackURL = TrackPack.Track(TrackNum) |
TrackWindow.NavigateUrl = TrackURL |
TrackWindow.VisibleOnPageLoad = True |
'New Code for popup, if Rad Window doesn't work; |
'Change return value of PackageTrack to JavaCommand instead of TrackURL |
'Response.Write(JavaCommand) |
End Sub |
Note: I'd prefer NOT to add the window dynamically, unless I absolutely have to.