I have three radgrids on one aspx page.
If you click on a row in RadGrid1 it will update the results in Radgrid2, and if you click on a row in Radgrid2 it will update the results in Radgrid3.
In RadGrid3 I have a GridTemplateColumn with an ImageButton that opens a new page using the RadWindowManager. This works great and the window opens, but only for the first row in RadGrid3. If I click on any other row I get the following JavaScript error.
Get_masterTableView(0.get_dataItems()[…] is null or not an object.
I have used the same code for other pages and it works flawlessly. The only difference here is I am using multiple grids vs. one grid on the page.
I think since RadGrid1 had only one row the RadWindowManager is pointing to it, I need the RadWindowManager to use the results from RadGrid3
| <telerik:RadWindowManager ID="RadWindowManager1" Style="z-index: 8000" Skin="Telerik" |
| VisibleOnPageLoad="false" runat="server"> |
| <Windows> |
| <telerik:RadWindow Skin="Office2007" ID="Nomination" runat="server" Title="Modify Nomination" |
| Height="300px" Width="450px" Left="150px" ReloadOnShow="true" Modal="true" /> |
| </Windows> |
| </telerik:RadWindowManager> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="ButtonSearch"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1"/> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadGrid1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid2" LoadingPanelID="RadAjaxLoadingPanel1"/> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadGrid2"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadGrid3"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadGrid3" LoadingPanelID="RadAjaxLoadingPanel1"/> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="30" BackColor="#E0E0E0"> |
| <img src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading6.gif") %>' alt="Searching..." style="border: 0; margin-top: 100px;" /> |
| </telerik:RadAjaxLoadingPanel> |
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
|
| <telerik:RadGrid ID="RadCustomer" runat="server" |
| AutoGenerateColumns="false" AllowSorting="true" Skin="Vista" EnableLinqExpressions="false" |
| Width="100%" OnItemDataBound="RadCustomer_ItemDataBound" OnNeedDataSource="RadCustomer_NeedDataSource" OnItemCreated="RadCustomer_ItemCreated" OnItemCommand="RadCustomer_ItemCommand"> |
| <ExportSettings IgnorePaging="True" OpenInNewWindow="True"> |
| <Pdf AllowCopy="True" PageTitle="PostingNotice Billing Report" Keywords="None" Subject="RadGrid Export" |
| Author="Anonymous" PageHeight="8.5in" PageWidth="14in" Title="PostingNotice Billing Report" /> |
| </ExportSettings> |
| <PagerStyle Mode="NumericPages"></PagerStyle> |
| <SortingSettings EnableSkinSortStyles="false" /> |
| <ClientSettings AllowColumnHide="True" AllowRowHide="True" AllowColumnsReorder="True" |
| ReorderColumnsOnClient="True"> |
| <Resizing EnableRealTimeResize="True" ResizeGridOnColumnResize="True" AllowColumnResize="true" |
| ClipCellContentOnResize="false"></Resizing> |
| </ClientSettings> |
| <MasterTableView TableLayout="Fixed" Name="Forms" GroupLoadMode="Client" EnableHeaderContextMenu="true" |
| AllowSorting="true" AllowMultiColumnSorting="True" AllowCustomSorting="false" CommandItemDisplay="Top"> |
| <HeaderStyle CssClass="HeaderStyle" /> |
| <%--<ItemStyle CssClass="ItemStyle" /> |
| <AlternatingItemStyle CssClass="AlternatingItemStyle" />--%> |
| <NoRecordsTemplate> |
| <div style="background-color: Silver; height: 20px; color: Red; text-align: center; |
| font-size: 10pt; font-family: Verdana; font-weight: bold;"> |
| <i>No forms defined for this application.</i> |
| </div> |
| </NoRecordsTemplate> |
| <CommandItemTemplate> |
| <table width="100%" class="RadCommandTable" style="padding: 0px;"> |
| <tr> |
| <td align="center"> |
| <asp:Button ID="btnFormsExport" CommandName="lnkFormsExport" runat="server" Text="FExport" /> |
| </td> |
| </tr> |
| </table> |
| </CommandItemTemplate> |
| <Columns> |
| <telerik:GridTemplateColumn HeaderText="Jurisdiction" SortExpression="Name" |
| DataField="Name" GroupByExpression="Name Group By Name" |
| UniqueName="Jurisdiction"> |
| <ItemTemplate> |
| <asp:Label ToolTip='<%# Eval("Name") %>' Text='<%# Eval("Name") %>' ID="lblJuris" runat="server"></asp:Label> |
| </ItemTemplate> |
| </telerik:GridTemplateColumn> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |
| protected void RadCustomer_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| RadGrid selGrid = (RadGrid)source; |
| if (e.Item is GridCommandItem) |
| { |
| //ExportPDF button clicks |
| if (e.CommandName == "lnkCustExport") |
| { |
| //Setting the PDF flag to true |
| isPdfExport = true; |
| ConfigureSelectFormsPDFExport(selGrid); |
| selGrid.MasterTableView.ExportToPdf(); |
| e.Item.OwnerTableView.Rebind(); |
| } |
| } |
| DataSet dsAdminEventInvites = new DataSet(); |
| EventInvite.GetEventInvites(databaseName, eventID, ref dsAdminEventInvites, ref errorMsg); |
| rgInvitesExport.DataSource = dsAdminEventInvites; |
| rgInvitesExport.DataBind(); |
| rgInvitesExport.ExportSettings.OpenInNewWindow = true; |
| rgInvitesExport.ExportSettings.ExportOnlyData = true; |
| rgInvitesExport.ExportSettings.IgnorePaging = true; |
| rgInvitesExport.ExportSettings.FileName = "EventAttendees_Report"; |
| rgInvitesExport.MasterTableView.ExportToExcel(); |
| <telerik:RadGrid ID="rgInvitesExport" runat="server" > |
| <MasterTableView> |
| <Columns> |
| <telerik:GridBoundColumn DataField="EventID" HeaderText="Event ID" UniqueName="EventID" /> |
| <telerik:GridBoundColumn DataField="InviteID" HeaderText="Invite ID" UniqueName="InviteID" /> |
| <telerik:GridBoundColumn DataField="ProfessionalID" HeaderText="Professional ID" UniqueName="ProfessionalID" /> |
| <telerik:GridBoundColumn DataField="Title" HeaderText="Title" UniqueName="Title" /> |
| <telerik:GridBoundColumn DataField="Affiliation" HeaderText="Affiliation" UniqueName="Affiliation" /> |
| <telerik:GridBoundColumn DataField="Degrees" HeaderText="Degrees" UniqueName="Degrees" /> |
| <telerik:GridBoundColumn DataField="Specialty" HeaderText="Specialty" UniqueName="Specialty" /> |
| <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" UniqueName="FirstName" /> |
| <telerik:GridBoundColumn DataField="MiddleName" HeaderText="Middle Name" UniqueName="MiddleName" /> |
| <telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" UniqueName="LastName" /> |
| <telerik:GridBoundColumn DataField="City" HeaderText="City" UniqueName="City" /> |
| <telerik:GridBoundColumn DataField="State" HeaderText="State" UniqueName="State" /> |
| <telerik:GridBoundColumn DataField="Province" HeaderText="Province" UniqueName="Province" /> |
| <telerik:GridBoundColumn DataField="PostalCode" HeaderText="Zip" UniqueName="Zip" /> |
| <telerik:GridBoundColumn DataField="OfficePhone" HeaderText="OfficePhone" UniqueName="OfficePhone" /> |
| <telerik:GridBoundColumn DataField="OfficePhoneExt" HeaderText="OfficePhoneExt" UniqueName="OfficePhoneExt" /> |
| <telerik:GridBoundColumn DataField="CellPhone" HeaderText="CellPhone" UniqueName="CellPhone" /> |
| <telerik:GridBoundColumn DataField="Fax" HeaderText="Fax" UniqueName="Fax" /> |
| <telerik:GridBoundColumn DataField="Email" HeaderText="Email" UniqueName="Email" /> |
| <telerik:GridBoundColumn DataField="DietaryNeed" HeaderText="Dietary Need" UniqueName="DietaryNeed" /> |
| <telerik:GridBoundColumn DataField="DietaryNeedOther" HeaderText="Dietary Need Other" UniqueName="DietaryNeedOther" /> |
| <telerik:GridBoundColumn DataField="BestContact" HeaderText="Best Contact" UniqueName="BestContact" /> |
| <telerik:GridBoundColumn DataField="BestContactOther" HeaderText="Best Contact Other" UniqueName="BestContactOther" /> |
| <telerik:GridBoundColumn DataField="ResponseDateTime" HeaderText="Registered Date and Time" UniqueName="ResponseDateTime" /> |
| <telerik:GridBoundColumn DataField="Status" HeaderText="Status" UniqueName="Status" /> |
| </Columns> |
| </MasterTableView> |
| </telerik:RadGrid> |