I have a "links" section on the site that displays links as descriptions in a column in a RadGrid. Using the ItemCommand event I get the dataitem and establish the hyperlink or location the user can visit. Using RegisterStartupScript and the RadWindowManager I can bring up a modal style window for the user that works great for presentation.
protected void grdSponsoredLinks_ItemCommand(object source, GridCommandEventArgs e) |
{ |
SponsoredLink sponsoredLink = GlobalMethods.GetController().DataCache.SponsoredLinks[e.Item.ItemIndex]; |
switch ( e.CommandName ) |
{ |
case "RowClick": |
{ |
string normalizedURL = sponsoredLink.LinkNavigationURL; |
if ( !normalizedURL.Contains("http") ) |
{ |
normalizedURL = "http://" + normalizedURL; |
} |
RadAjaxPanel ajaxPanel = (RadAjaxPanel) HTMLUtility.FindControlRecursive(this.Master, "ajaxPanelLinks"); |
RadWindowManager windowManager = (RadWindowManager) HTMLUtility.FindControlRecursive(this.Master, "RadWindowManagerLinks"); |
string myScript = String.Format("$find('{0}').open('" + normalizedURL + "');", windowManager.ClientID); |
ScriptManager.RegisterStartupScript(this.Page, typeof(Page), "OpenWindowKey", myScript, true); |
break; |
} |
} |
} |
The questions I have are:
- The MainMenu (RadMenu) component on the MasterPage does not remain behind the modal window when the window is moved around on the screen (using IE 7). I tried setting the z-index using another thread in these forums (z-index) and it has no effect. Actually the hyperlink manager dialog we use in these forums to insert hyperlinks displays the window in a modal mode and has the effect I desire.
- Is there a way to create a master page for the window that opens that could contain a large close or bookmark button?
- Setting the RadWindowManager width and height seems to correlate to the window sizes. Is this better controlled otherwise?
- Once Maximized when the user browses back on the IE navigation it leaves the host page and returns to the previous page, in this case the main or default page. Is there a way to stop that behaviour so that as the popup modal window browses back (unless they have clicked links on the "links" page they were directed to) it closes instead of navigating off the :links" page?
Thanks