RadGrid
radGrid2 = RadGrid1.FindControl("RadGrid2") as RadGrid;
above code does not work, need to export data from inner grid to excel but does not exist programmically.
How do you find grid2 within grid1?
code below:
<
telerik:RadGrid ID="RadGrid1" runat="server" AllowMultiRowSelection="False" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="MasterDataSource" GridLines="None" ShowStatusBar="true" Skin="Web20" Width="1280px">
<PagerStyle Mode="Slider" />
<MasterTableView runat="server" AllowMultiColumnSorting="True" AlternatingItemStyle-BackColor="AliceBlue" DataKeyNames="SI_YYYY,SI_MM,SI_DD" DataSourceID="MasterDataSource" PageSize="15" ItemStyle-HorizontalAlign="Left" AlternatingItemStyle-HorizontalAlign="Left">
<NestedViewTemplate>
<fieldset id="fieldset1" runat="server" style="padding: 10px;">
<legend style="padding: 5px;"><b>specimen drop offs for: </b>
<asp:Label ID="Label1" runat="server" Font-Bold="true" Font-Italic="true" Text='<%# Eval("SI_DATE") %>' Visible="false"></asp:Label>
</legend>
<asp:Button ID="Button1" CssClass="button" Width="150px" Text="Export to Excel" OnClick="Button1_Click"
runat="server"></asp:Button>
<asp:SqlDataSource ID="DetailsDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:dbConnectionString %>"
ProviderName="<%$ AppSettings:providerName %>"
SelectCommand="SELECT * FROM V_VISITS WHERE si_date = :si_date">
<SelectParameters>
<asp:ControlParameter ControlID="Label1" Name="si_date" PropertyName="Text" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<telerik:RadGrid ID="RadGrid2" runat="server" AllowMultiRowSelection="False" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="DetailsDataSource" GridLines="None" HeaderStyle-Wrap="false" PageSize="10" ShowStatusBar="true" Skin="Web20">
<PagerStyle Mode="Slider" />