2 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 14 Aug 2008, 11:54 AM
Hi Paul,
Try setting the IgnorePaging property to true in the Export button Click event and see whether the detail tables are also getting exported.
CS:
Thanks
Shinu.
Try setting the IgnorePaging property to true in the Export button Click event and see whether the detail tables are also getting exported.
CS:
protected void Button1_Click1(object sender, EventArgs e) |
{ |
RadGrid1.ExportSettings.IgnorePaging = true; |
RadGrid1.ExportSettings.OpenInNewWindow = true; |
RadGrid1.MasterTableView.ExportToExcel(); |
} |
Thanks
Shinu.
0
Paul
Top achievements
Rank 1
answered on 14 Aug 2008, 12:28 PM
Hi Shinu,
I have this option set (I have included my code below). I define my grid in the codebehind the not aspx do i need to set any flags on the detail table to indicate it can be exported?
Thanks
Button code:
protected void ExportToExcel_Click(object sender, ImageClickEventArgs e)
{
rgScout.ExportSettings.ExportOnlyData = true;
rgScout.ExportSettings.IgnorePaging = true;
rgScout.ExportSettings.OpenInNewWindow = true;
rgScout.ExportSettings.FileName = "ScoutChanges";
rgScout.MasterTableView.ExportToExcel();
}
This is how I define the detail table
I have this option set (I have included my code below). I define my grid in the codebehind the not aspx do i need to set any flags on the detail table to indicate it can be exported?
Thanks
Button code:
protected void ExportToExcel_Click(object sender, ImageClickEventArgs e)
{
rgScout.ExportSettings.ExportOnlyData = true;
rgScout.ExportSettings.IgnorePaging = true;
rgScout.ExportSettings.OpenInNewWindow = true;
rgScout.ExportSettings.FileName = "ScoutChanges";
rgScout.MasterTableView.ExportToExcel();
}
This is how I define the detail table
// Add the child table for the history records//////////////////////////////// |
rgScout.MasterTableView.DetailTables.Add(new GridTableView()); |
rgScout.MasterTableView.DetailTables[0].DataMember = "Child"; |
rgScout.MasterTableView.DetailTables[0].Caption = "Changes to the information about a person"; |
// Action Audit ID - Child |
gridCol = new GridBoundColumn(); |
rgScout.MasterTableView.DetailTables[0].Columns.Add(gridCol); |
gridCol.HeaderText = ""; |
gridCol.DataField = "PersonID"; |
gridCol.Visible = false; |
// Action - Child |
gridCol = new GridBoundColumn(); |
rgScout.MasterTableView.DetailTables[0].Columns.Add(gridCol); |
gridCol.HeaderText = "Action"; |
gridCol.DataField = "Action"; |
gridCol = new GridBoundColumn(); |
rgScout.MasterTableView.DetailTables[0].Columns.Add(gridCol); |
gridCol.HeaderText = "SAP Number"; |
gridCol.DataField = "SAPEmployeeNumber"; |
gridCol = new GridBoundColumn(); |
rgScout.MasterTableView.DetailTables[0].Columns.Add(gridCol); |
gridCol.HeaderText = "Forename"; |
gridCol.DataField = "Forename"; |
gridCol = new GridBoundColumn(); |
rgScout.MasterTableView.DetailTables[0].Columns.Add(gridCol); |
gridCol.HeaderText = "Surname"; |
gridCol.DataField = "Surname"; |
gridCol = new GridBoundColumn(); |
rgScout.MasterTableView.DetailTables[0].Columns.Add(gridCol); |
gridCol.HeaderText = "Gender"; |
gridCol.DataField = "Sex"; |
gridCol = new GridBoundColumn(); |
rgScout.MasterTableView.DetailTables[0].Columns.Add(gridCol); |
gridCol.HeaderText = "From Date"; |
gridCol.DataField = "fromdate"; |
gridCol = new GridBoundColumn(); |
rgScout.MasterTableView.DetailTables[0].Columns.Add(gridCol); |
gridCol.HeaderText = "To Date"; |
gridCol.DataField = "todate"; |