Hi,
I'm using a RadGrid inside a RadWindow (as a popup), to allow the user select a row that will be added on the main page.
I want to get the Key of the selected row and pass it to the main page, the code of the page that loads into RadWindow is:
This code work fine for IE7, however, the event doesn't get fired in Firefox3 (I tried putting a breakpoint on the function OnClientRowSelected(sender, eventArgs) (line 20) and Firefox never reaches it.
I would appreciate any help on this matter,
Regards,
Raúl Herrmann
I'm using a RadGrid inside a RadWindow (as a popup), to allow the user select a row that will be added on the main page.
I want to get the Key of the selected row and pass it to the main page, the code of the page that loads into RadWindow is:
| <%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewsSelect.aspx.cs" Inherits="SR.News.Views.NewsSelect" | |
| Title="NewsSelect" %> | |
| <%@ Register Assembly="Microsoft.Practices.Web.UI.WebControls" Namespace="Microsoft.Practices.Web.UI.WebControls" | |
| TagPrefix="pp" %> | |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%"> | |
| <head id="Head" runat="server"> | |
| <script type="text/javascript"> | |
| function GetRadWindow() | |
| { | |
| var oWindow = null; | |
| if (window.radWindow) | |
| oWindow = window.radWindow; | |
| else if (window.frameElement.radWindow) | |
| oWindow = window.frameElement.radWindow; | |
| return oWindow; | |
| } | |
| function OnClientRowSelected(sender, eventArgs) | |
| { | |
| var currentWindow = GetRadWindow(); | |
| var newsId = eventArgs.getDataKeyValue("NewsID") | |
| currentWindow.close(newsId); | |
| } | |
| </script> | |
| <link href="../App_Themes/Default/rightcontent.css" type="text/css" rel="stylesheet" /> | |
| <title>SardegnaRicerche</title> | |
| </head> | |
| <body style="height: 100%; margin: 0 auto; overflow: hidden" scroll="no"> | |
| <form id="form1" runat="server" style="height: 100%; width: 100%; margin: 0px"> | |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server" | |
| OutputCompression="AutoDetect"> | |
| </telerik:RadScriptManager> | |
| <pp:ObjectContainerDataSource ID="odsNews" runat="server" | |
| DataObjectTypeName="SRRules.Entities.News" /> | |
| <telerik:RadGrid ID="grdFiles" runat="server" AutoGenerateColumns="False" | |
| GridLines="None" Skin="Office2007" DataSourceID="odsNews"> | |
| <MasterTableView DataKeyNames="NewsID" DataSourceID="odsNews" | |
| ClientDataKeyNames="NewsID"> | |
| <RowIndicatorColumn> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </RowIndicatorColumn> | |
| <ExpandCollapseColumn> | |
| <HeaderStyle Width="20px"></HeaderStyle> | |
| </ExpandCollapseColumn> | |
| <Columns> | |
| <telerik:GridBoundColumn DataField="Priority" DataType="System.Int32" HeaderText="Priorità " | |
| ReadOnly="True" SortExpression="Priority" UniqueName="Priority"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridBoundColumn DataField="Title" | |
| HeaderText="News" UniqueName="Title" SortExpression="Title"> | |
| </telerik:GridBoundColumn> | |
| <telerik:GridDateTimeColumn DataField="StartDatePublication" | |
| HeaderText="Data pubblicazione" SortExpression="StartDatePublication" | |
| UniqueName="StartDatePublication" DataFormatString="{0:d}" | |
| DataType="System.DateTime"> | |
| </telerik:GridDateTimeColumn> | |
| <telerik:GridDateTimeColumn DataField="EndDatePublication" | |
| HeaderText="Data scadenza" SortExpression="EndDatePublication" | |
| UniqueName="EndDatePublication" DataFormatString="{0:d}" | |
| DataType="System.DateTime"> | |
| </telerik:GridDateTimeColumn> | |
| </Columns> | |
| </MasterTableView> | |
| <ClientSettings> | |
| <Selecting AllowRowSelect="True" EnableDragToSelectRows="False" /> | |
| <ClientEvents OnRowSelected="OnClientRowSelected" /> | |
| </ClientSettings> | |
| <FilterMenu EnableTheming="True" Skin="Office2007"> | |
| <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation> | |
| </FilterMenu> | |
| </telerik:RadGrid> | |
| </form> | |
| </body> | |
| </html> |
This code work fine for IE7, however, the event doesn't get fired in Firefox3 (I tried putting a breakpoint on the function OnClientRowSelected(sender, eventArgs) (line 20) and Firefox never reaches it.
I would appreciate any help on this matter,
Regards,
Raúl Herrmann