
I currently have a RadGrid (MainGrid) that contains a Template Column. This Template Column itself contains a separate RadGrid (SubGrid).
The MainGrid has an EditFormTemplate in which I have an ASP.NET PlaceHolder. During MainGrid's ItemCreated event, I check to make sure the Item is in EditMode, instantiate a new RadGrid, and make this new RadGrid equal to the SubGrid (SubGridEdit). During runtime, SubGridEdit displays perfectly fine with all of the correct columns and data, but any attempt during the MainGrid's ItemCommand or UpdateCommand events to access the data rows fails. Everything appears to be fine, but the application is reporting that SubGridEdit has 0 items in its collection.
During MainGrid's ItemCreated event, I have verified that SubGridEdit (a copy of SubGrid that is added to my Placeholder) contains Items in its collection, but once the application moves to the UpdateCommand or ItemCommand events for MainGrid, I'm lost. I'm able to access SubGridEdit by using the FindControl method of the GridEditableItem/GridDataItem, but it's reporting no Items in its collection despite them clearly being displayed.
In essence, SubGrid contains data that is tied to each record in MainGrid. Editing MainGrid involves also editing SubGrid. In this case, SubGrid contains a few checkboxes that the user should be able to mark or unmark while editing MainGrid. In order to do so, though, I need to be able to access the controls of the RadGrid inside of the EditFormTemplate. Any pointers?
Here's the ItemDataBound and ItemCreated events for the MainGrid and the relevant ASPX (Names/IDs changed to examples for security purposes)
protected void gvOptionsPOP_ItemDataBound(object sender, GridItemEventArgs e){ if (e.Item is GridDataItem && !e.Item.IsInEditMode) { GridDataItem item = (GridDataItem)e.Item; RadGrid test123 = (RadGrid)item.FindControl("gvRequirements"); int id = Convert.ToInt32(item["OptionYearID"].Text); string _URLAuthority = Request.Url.Authority; string _URLScheme = Request.Url.Scheme; if (_URLAuthority.Contains("localhost")) { _URLAuthority = _URLAuthority.Replace(Request.Url.Authority, "exampleurl"); } if (_URLScheme == "http") { _URLScheme = "https"; } string _baseURL = _URLScheme + "://" + _URLAuthority + "/SRTD"; test123.DataSource = ExampleClass.GetData(id, _baseURL); test123.Rebind(); CheckBox chk = (CheckBox)item["OptionExecute"].Controls[0]; LinkButton lnkbutton = (LinkButton)item["EditPOP"].Controls[0]; lnkbutton.Enabled = false; if (item.ItemIndex == 0 && chk.Checked) { lnkbutton.Enabled = true; } else if (chk.Checked) { foreach (GridDataItem test1 in gvOptionsPOP.Items) { CheckBox chk2 = (CheckBox)test1["OptionExecute"].Controls[0]; LinkButton lnkbutton2 = (LinkButton)test1["EditPOP"].Controls[0]; if (chk2.Checked) { lnkbutton2.Enabled = false; } } lnkbutton.Enabled = true; } }}protected void gvOptionsPOP_ItemCreated(object sender, GridItemEventArgs e){ if (e.Item is GridEditableItem && e.Item.IsInEditMode) { GridEditFormItem editedItem = (GridEditFormItem)e.Item; GridDataItem originalItem = editedItem.ParentItem; RadGrid test123 = (RadGrid)originalItem.FindControl("gvRequirementsPOP"); PlaceHolder editPanel = (PlaceHolder)editedItem.FindControl("pnlPlaceHolder"); RadGrid test456 = test123; foreach (GridDataItem dataItem in test123.Items) { CheckBox chkbox = (CheckBox)dataItem["CheckboxTemplate"].FindControl("RequirementExecute"); chkbox.Enabled = true; } test456.Rebind(); }}<telerik:RadGrid ID="gvOptionsPOP" runat="server"AllowPaging="false"PageSize="20"AllowSorting="false"ShowFooter="false"ShowStatusBar="false"AutoGenerateColumns="false"OnNeedDataSource="gvOptionsPOP_NeedDataSource"OnItemCommand="gvOptionsPOP_ItemCommand"OnItemCreated="gvOptionsPOP_ItemCreated"OnUpdateCommand="gvOptionsPOP_UpdateCommand"OnItemDataBound="gvOptionsPOP_ItemDataBound"Width="80%"GridLines="Both"ItemStyle-BorderStyle="Solid"> <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="false" /> <MasterTableView AllowFilteringByColumn="false" ShowFooter="false" ShowHeadersWhenNoRecords="true" BorderStyle="Solid"> <EditFormSettings EditFormType="Template"> <FormTemplate> <br /> <asp:PlaceHolder ID="pnlPlaceHolder" runat="server" /> <br /> <span> <asp:Button runat="server" ID="btnUpdate" Text="Update" CommandName="Update" /> <asp:Button runat="server" ID="btnCancel" Text="Cancel" CommandName="Cancel" /> </span> </FormTemplate> </EditFormSettings> <NoRecordsTemplate> <div>NO OPTIONS FOUND.</div> </NoRecordsTemplate> <Columns> <telerik:GridButtonColumn UniqueName="EditPOP" CommandName="Edit" Text="Edit" /> <telerik:GridBoundColumn UniqueName="OptionYearID" DataField="options_id" HeaderText="Option Year ID" ItemStyle-HorizontalAlign="Center" Display="false" HeaderStyle-HorizontalAlign="Center" /> <telerik:GridBoundColumn UniqueName="OptionYear" DataField="option_period" HeaderText="Option Year" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> <telerik:GridDateTimeColumn UniqueName="POPStart" DataField="option_award_date" HeaderText="Proposed/Actual Start Date" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> <telerik:GridDateTimeColumn UniqueName="POPEnd" DataField="option_end_date" HeaderText="Proposed/Actual End Date" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> <telerik:GridTemplateColumn UniqueName="RequirementTemplate" HeaderText="Requirement/CSA#" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center"> <ItemTemplate> <telerik:RadGrid ID="gvRequirementsPOP" runat="server" AllowPaging="false" PageSize="20" AllowSorting="false" ShowFooter="false" ShowStatusBar="false" AutoGenerateColumns="false" OnItemDataBound="gvRequirementsPOP_ItemDataBound" Width="100%" ItemStyle-BorderStyle="Solid"> <ClientSettings EnableRowHoverStyle="true" EnablePostBackOnRowClick="false" /> <MasterTableView AllowFilteringByColumn="false" ShowFooter="false" ShowHeadersWhenNoRecords="true" BorderStyle="Solid" DataKeyNames="ReqCSA, EXECUTION_FLAG"> <NoRecordsTemplate> <div>NO REQUIREMENTS FOUND.</div> </NoRecordsTemplate> <Columns> <telerik:GridBoundColumn UniqueName="RequirementsID" DataField="Requirements_ID" HeaderText="Requirements ID" Display="false" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> <telerik:GridBoundColumn UniqueName="ExecutionFlag" DataField="EXECUTION_FLAG" HeaderText="Execution Flag" Display="false" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> <telerik:GridHyperLinkColumn UniqueName="ReqLink" DataTextFormatString="{0}" DataNavigateUrlFields="ReqLink" DataNavigateUrlFormatString="{0}" DataTextField="ReqCSA" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" HeaderText="SCA#" ItemStyle-Width="25%" HeaderStyle-Width="25%" /> <telerik:GridTemplateColumn UniqueName="CheckboxTemplate" HeaderText="Execute" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="25%" HeaderStyle-Width="25%" > <ItemTemplate> <asp:CheckBox ID="RequirementExecute" runat="server" Text="Execute" /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridBoundColumn UniqueName="RequirementType" DataField="REQUIREMENT_TYPE" HeaderText="Type" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="25%" HeaderStyle-Width="25%" /> <telerik:GridBoundColumn UniqueName="RequirementStatus" DataField="REQUIREMENT_Status" HeaderText="Status" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" ItemStyle-Width="25%" HeaderStyle-Width="25%" /> </Columns> </MasterTableView> </telerik:RadGrid> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridCheckBoxColumn UniqueName="OptionExecute" DataField="EXECUTION_FLAG" HeaderText="Option Execute" ItemStyle-HorizontalAlign="Center" HeaderStyle-HorizontalAlign="Center" /> </Columns> </MasterTableView></telerik:RadGrid>
I open a child radwindow popup from parent radwindow popup. This works quite good but client wants to move child/second radwindow popup outside the boundaries of parent/first radwindow popup. I used following code to open the child/second popup in the parent page of first radwindow popup:
GetRadWindow().BrowserWindow;
It opens the child/second radwindow popup in the page but it closes the parent/first radwindow popup.
Please suggest a solution to solve this issue and achieve the requirement.
Hi,
I would like to use some Awesome Font icons instead of using the ImageUrl attribute, is this possible? I noticed that this seems possible on a normal RadButton but the same implementation does not seem to work on a RibbonBarButton. Ideas, or is this just not possible on a RibbonBarButton?
Thanks,
Gary Kearney

I have Grouping set to True but do not know how to add a field to it during design time or in the page load event.
<
asp:DropDownList ID="ddlEntityTypeFilter" runat="server" AutoPostBack="true"
OnSelectedIndexChanged="ddlEntityTypeFilter_SelectedIndexChanged">
I have succeeded in getting the postback to work correctly so that the RadGrid is updated after a telRadGrid.Rebind().
And everything seems to work EXCEPT the DropDownList does NOT persist the SelectedIndex. I can retain the SelectedIndex in a session variable, but I have not been able to reset the SelectedIndex so that it shows the correct index that was selected for the postback.
Which DropDownList event, and/or RadGrid event, and/or Page event should I be using? Any code to show how to do this would be most appreciated. Thanks.
Hello,
We recently moved to Azure, and in our staging environments, we have had repeated 502 errors when attempting to export to excel from a radgrid.
Restarting the app allows export to be used again for some time.
I've read some forums that seemed to have similar issues, but not exactly. Was wondering if there was a common fix for this issue that i missed somewhere.
Thanks for your help!

foreach (string chemical in chemicalsArrayList){ AutoCompleteBoxEntry entry = new AutoCompleteBoxEntry(); chemicalBC = BCFactory.ChemicalBC; DataSet dsClassifications = chemicalBC.GetClassificationByChemicalName(chemical); entry.Text = chemical; if (dsClassifications.Tables[0].Rows.Count != 0) { entry.ToolTip = dsClassifications.Tables[0].Rows[0][0].ToString(); entry.ForeColor = System.Drawing.ColorTranslator.FromHtml("#" + dsClassifications.Tables[0].Rows[0]["Color"].ToString()); } else { entry.ToolTip = ""; } racbChemicals.Entries.Add(entry);}
