안녕하세요 Telerik RadGrid를 사용하는 DNN 응용 프로그램이 있습니다. 그리드에서 일부 데이터를 내보내는 중이지만 그리드 컨트롤을 드릴 다운하고 데이터를 내보낼 때 업데이트 된 그리드가 아닌 초기 최상위 레벨 데이터 만 볼 수 있습니다. 여기에 내 테이블 태그와 지원 코드가 있습니다. 나는 ASPX/C# 전문가가 아니므로 내 초보자를 용서해주십시오.Telerik RadGrid가 그룹화 된 데이터를 내보내기하지 않는 것 같습니다
<mastertableview autogeneratecolumns="False" datakeynames="AccountId" datasourceid="SqlDataSource1"
groupsdefaultexpanded="False">
<DetailTables>
<telerik:GridTableView runat="server" DataKeyNames="StatementId" DataSourceID="SqlDataSource2"
Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False" >
<DetailTables>
<telerik:GridTableView runat="server" DataSourceID="SqlDataSource3" Font-Bold="False"
Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
GroupsDefaultExpanded="False" ShowFooter="True" ShowGroupFooter="True" AllowMultiColumnSorting="True"
GridLines="None">
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="StatementId" MasterKeyField="StatementId" />
</ParentTableRelation>
<AlternatingItemStyle BackColor="White" Font-Bold="False" Font-Italic="False" Font-Overline="False"
Font-Strikeout="False" Font-Underline="False" Wrap="True" />
<HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
Font-Underline="False" Wrap="True" />
<FooterStyle BackColor="Yellow" Font-Bold="False" Font-Italic="False" Font-Overline="False"
Font-Strikeout="False" Font-Underline="False" Wrap="True" />
</telerik:GridTableView>
</DetailTables>
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="AccountId" MasterKeyField="AccountId" />
</ParentTableRelation>
<CommandItemSettings ExportToPdfText="Export to Pdf" />
<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
</telerik:GridTableView>
</DetailTables>
<ParentTableRelation>
<telerik:GridRelationFields DetailKeyField="AccountId" MasterKeyField="AccountId" />
</ParentTableRelation>
<ExpandCollapseColumn Visible="True">
</ExpandCollapseColumn>
<Columns>
<telerik:GridBoundColumn DataField="ACCOUNTID" DataType="System.Int32" HeaderText="ACCOUNTID"
SortExpression="ACCOUNTID" UniqueName="ACCOUNTID">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="ACCOUNTREF" HeaderText="ACCOUNTREF" SortExpression="ACCOUNTREF"
UniqueName="ACCOUNTREF">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="CUSTOMERID" DataType="System.Int32" HeaderText="CUSTOMERID"
SortExpression="CUSTOMERID" UniqueName="CUSTOMERID">
</telerik:GridBoundColumn>
</Columns>
</mastertableview>
로 수출하는 부하에 스크립트 관리자에 등록됩니다
protected void Page_Load(object sender, EventArgs e)
{
Button2.Enabled = Session[UserSelection.SelectedValue] != null ? true : false;
ScriptManager.GetCurrent(Page).RegisterPostBackControl(Button3);
ScriptManager.GetCurrent(Page).RegisterPostBackControl(Button4);
}
와 나는 함께 내보내기를 호출 '다음
이protected void Button3_Click(object sender, System.EventArgs e)
{
//ConfigureExport();
RadGrid1.Rebind();
RadGrid1.ExportSettings.FileName = "RadGridExportToExcel";
RadGrid1.ExportSettings.ExportOnlyData = true;
RadGrid1.ExportSettings.OpenInNewWindow = true;
RadGrid1.MasterTableView.ExportToExcel();
}
사람이 내가 부족 것을 볼 수 , DNN/ASPX 경험 및 의지와는 별도로 :
이 telerik 포럼 게시물을 사용해보십시오. http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-hierarchical-export-to-excel.aspx – SlackGadget