This is a migrated thread and some comments may be shown as answers.

Export hierarchical grid with complete data

11 Answers 511 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Murad Ajani
Top achievements
Rank 1
Murad Ajani asked on 05 Sep 2009, 02:34 AM
I am trying export all detail tables and the main grid data.  The problem is that it only exports the main grid data if the detail grids are not expanded.  Below is the export code.  How do I expand all items in order to export complete data?

 

Private Sub btnExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnExport.Click

 

'LoopHierarchyRecursive(grdEmpData.MasterTableView)

grdEmpData.MasterTableView.HierarchyDefaultExpanded =

True

 

 

'grdEmpData.MasterTableView.Rebind()

 

grdEmpData.ExportSettings.ExportOnlyData =

True

 

 

'grdEmpData.ExportSettings.IgnorePaging = True

 

grdEmpData.MasterTableView.AllowPaging =

False

 

grdEmpData.ExportSettings.OpenInNewWindow =

True

 

grdEmpData.ExportSettings.FileName =

"SAPDataList"

 

grdEmpData.MasterTableView.ExportToExcel()
End Sub

Sub LoopHierarchyRecursive(ByVal gridTableView As GridTableView)

 

 

For Each nestedViewItem As GridNestedViewItem In gridTableView.GetItems(GridItemType.NestedView)

 

nestedViewItem.Expanded = True

 

 

 

If nestedViewItem.NestedTableViews.Length > 0 Then

 

 

 

'now you can access: nestedViewItem.NestedTableViews[0].Items, which will be the DataItems of this nested table

 

 

 

'then make recursive call

 

 

 

LoopHierarchyRecursive(nestedViewItem.NestedTableViews(0))

 

 

' above [0] stands for the first table in the hierarchy, since Telerik RadGrid supports multiple tables at a level

 

 

 

End If

 

 

 

Next

 

 

 

 

 

 

End Sub

 

 

 

Here is the structure and code:
MainGrid
    MaterTableView
        DetailTable
            NestedViewTemplate (using nested view because each detail table row will have different datasource)
                ChildGrid

 

 

<MasterTableView Name="EmployeeList" GridLines="None" DataKeyNames="SAPEmployeeNo" AllowSorting="True" ShowHeader="True">

 

 

<DetailTables>

 

 

 

 

 

<telerik:GridTableView DataKeyNames="EmployeeNo, CategoryId" Name="Category" Width="1050px" runat="server" PagerStyle-Position="bottom">

 

 

 

 

 

<NestedViewTemplate>

 

 

 

 

 

<telerik:RadGrid ID="EmpData" OnNeedDataSource="gridEmpData_NeedDataSource" runat="server" Width="1050px">

 

 

 

 

 

<ItemStyle CssClass="RadGridItem"></ItemStyle>

 

 

 

 

 

<AlternatingItemStyle CssClass="RadGridItem"></AlternatingItemStyle>

 

 

 

 

 

<ClientSettings>

 

 

 

 

 

<Scrolling AllowScroll="true" ScrollHeight="40px" UseStaticHeaders="true" />

 

 

 

 

 

</ClientSettings>

 

 

 

 

 

</telerik:RadGrid>

 

 

 

 

 

</NestedViewTemplate>

 

 

 

 

 

<ParentTableRelation>

 

 

 

 

 

<telerik:GridRelationFields DetailKeyField="EmployeeNo" MasterKeyField="EmployeeNo" />

 

 

 

 

 

</ParentTableRelation>

 

 

 

 

 

<Columns>

 

 

 

 

 

<telerik:GridBoundColumn DataField="EmployeeNo" UniqueName="EmployeeNo" Visible="false" />

 

 

 

 

 

<telerik:GridBoundColumn DataField="CategoryId" UniqueName="CategoryId" Visible="false" />

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="" DataField="CategoryName" SortExpression="CategoryName" UniqueName="CategoryName" />

 

 

 

 

 

</Columns>

 

 

 

 

 

</telerik:GridTableView>

 

 

 

 

 

</DetailTables>

 

 

 

 

 

<Columns>

 

 

 

 

 

<telerik:GridTemplateColumn UniqueName="btnEdit" HeaderStyle-Width="30px" ItemStyle-Width="30px">

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<asp:ImageButton ImageAlign=AbsBottom id="btnEditEmp" runat="server" imageurl="~/images/edit.gif" alternatetext="Edit" />&nbsp;

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:GridTemplateColumn>

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="EmpNo" DataField="EmployeeNo" SortExpression="EmployeeNo" UniqueName="EmployeeNo" />

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="Last Name" DataField="LastName" SortExpression="LastName" UniqueName="LastName" />

 

 

 

 

 

<telerik:GridBoundColumn HeaderText="First Name" DataField="FirstName" SortExpression="FirstName" UniqueName="FirstName" />

 

 

 

 

 

<ExpandCollapseColumn ButtonType="ImageButton" Visible="False" UniqueName="ExpandColumn"></ExpandCollapseColumn>

 

 

 

 

 

</MasterTableView>

Thanks!

 

11 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 07 Sep 2009, 07:25 AM
Hi,

Try setting the IgnorePaging property in the ExportSettings of the Grid to true along with the HierarchyDefaultExpanded property and see whether the details tables are also getting exported along with the master table.

VB:
 
 
 
    Protected Sub Button1_Click(ByVal sender As ObjectByVal e As EventArgs) 
        RadGrid2.ExportSettings.ExportOnlyData = True 
        RadGrid2.MasterTableView.HierarchyDefaultExpanded = True 
        RadGrid2.ExportSettings.IgnorePaging = True 
        RadGrid2.ExportSettings.OpenInNewWindow = True 
        RadGrid2.MasterTableView.ExportToExcel() 
    End Sub 
 
 

Shinu


0
Murad Ajani
Top achievements
Rank 1
answered on 07 Sep 2009, 02:24 PM
I tried with setting IgnorePaging property but only the first level is expanded in the excel sheet i.e. only the first detail table is expanded and other grid under the NestedViewTemplate does not appear on the export.  I need to expand both the detail table when I export to excel.  That is the reason I was trying to loop through all levels to expand using the recursive function - LoopHierarchyRecursive(grdEmpData.MasterTableView) provided in one of the demo pages but that does not help.

MainGrid
MaterTableView
DetailTable (1st level table)
NestedViewTemplate (using nested view because each detail table row above will have different datasource)
ChildGrid (2nd level table)

- Thanks!
0
Pavlina
Telerik team
answered on 08 Sep 2009, 08:35 AM
Hi Murad,

Please examine the code snippet bellow and let me know if it works for you.
VB.NET:
Protected Sub Button1_Click(sender As Object, e As EventArgs)  
    ConfigureExport()  
    RadGrid1.MasterTableView.HierarchyDefaultExpanded = True 
    RadGrid1.Rebind()  
    RadGrid1.MasterTableView.ExportToExcel()  
End Sub 
Public Sub ConfigureExport()  
    RadGrid1.ExportSettings.ExportOnlyData = True 
    RadGrid1.ExportSettings.IgnorePaging = True 
    RadGrid1.ExportSettings.OpenInNewWindow = True 
 
End Sub 

I hope this helps.

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Murad Ajani
Top achievements
Rank 1
answered on 08 Sep 2009, 10:30 PM
The only line difference from my code is the ReBind() method.  I did not call this.  However, this does not help exporting all 3 levels of detail tables.  We have been posting back and forth with 4 statements (HierarchyDefaultExpanded, ExportOnlyData, IgnorePaging, OpenInNewWindow) but that does not expand all levels.  Any other work around?  The below code snippet from the demo does not help.

LoopHierarchyRecursive(grdEmpData.MasterTableView)

Sub LoopHierarchyRecursive(ByVal gridTableView As GridTableView)
        For Each nestedViewItem As GridNestedViewItem In gridTableView.GetItems(GridItemType.NestedView)                 nestedViewItem.Expanded = True
            If nestedViewItem.NestedTableViews.Length > 0 Then
                LoopHierarchyRecursive(nestedViewItem.NestedTableViews(0))
            End If
        Next
End Sub

0
Pavlina
Telerik team
answered on 09 Sep 2009, 05:05 PM
Hi Murad,

To avoid duplicate posts, we can continue our communication on the subject in the support ticket that you have opened on the matter.

Kind regards,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kris
Top achievements
Rank 1
answered on 19 Oct 2009, 03:25 PM
I am also having the same issue. I am trying to export a hierarchical grid with 3 levels. First level is Systems. Second level is System Assessments and Faciltiies under that System, and third level is Facility Assessments. The export is working correctly on the 1st and 2nd level but it is not exporting the 3rd level, the Facility Assessments.

Here is the code I am using to produce this:

            case "Export to Excel (Hierarchical)":
                RadGrid1.ExportSettings.ExportOnlyData = true;
                RadGrid1.ExportSettings.IgnorePaging = true;
                RadGrid1.ExportSettings.OpenInNewWindow = true;
                RadGrid1.MasterTableView.HierarchyDefaultExpanded = true;
                RadGrid1.MasterTableView.ExportToExcel();
                break;

Any help on how to export this third level with hierarchy intact is much appreciated.
Thanks
Kris
0
Pavlina
Telerik team
answered on 19 Oct 2009, 04:00 PM
Hello Kris,

Attached to this message is a simple working project which handles the desired functionality. Please give it a try and let me know if it works for you.

I hope this helps.

Best wishes,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Atul
Top achievements
Rank 1
answered on 21 Aug 2010, 01:50 PM

Hiii,
I am facing problem in exporting nested template in to pdf.  Every time ,it gives me a default pdf export ( without the data in nested template).  For the same structure, I am able to export nested view in excel suucssfully.
I am surprised with this behaviour as line of codes for both export are lmost name

here is the  code snippet, I am using

For export to Excel: ( This works fine and export nested Data also)
RadGrid1.ExportSettings.ExportOnlyData =true;

 

RadGrid1.ExportSettings.IgnorePaging =

true;

 

RadGrid1.ExportSettings.OpenInNewWindow =

true;

 

RadGrid1.ExportSettings.HideStructureColumns =

true;

 

RadGrid1.MasterTableView.HierarchyDefaultExpanded =

true;

 

 

RadGrid1.Rebind();

 

RadGrid1.MasterTableView.ExportToExcel();

 

For export to PDF:( this only gives up default Data)

 

RadGrid1.ExportSettings.ExportOnlyData =

true;

 

RadGrid1.ExportSettings.Pdf.PageWidth =

Unit.Pixel(900);

 

RadGrid1.ExportSettings.Pdf.PageHeight =

Unit.Pixel(612);

 

RadGrid1.ExportSettings.IgnorePaging =

true;

 

RadGrid1.ExportSettings.OpenInNewWindow =

true;

 

 

RadGrid1.ExportSettings.Pdf.PageTitle = TitleDoc;

 

RadGrid1.MasterTableView.HierarchyDefaultExpanded =

true;

 

RadGrid1.Rebind();

RadGrid1.MasterTableView.ExportToPdf();

 


One thing, I noticed there is nochange in behviour even if I remove
RadGrid1.Rebind() line.


In nested template we are using a list view and binding its columns.

 

<

 

NestedViewTemplate>

 

 

 

 

 

<asp:Panel ID="panel1" runat="server" BorderStyle="Solid" BorderWidth="2px">

 

 

 

 

 

<telerik:RadListView ID="RadListView1" runat="server" DataSourceID="ObjectDataSource1"

 

 

 

 

 

ItemPlaceholderID="ParentContainer">

 

 

 

 

 

<LayoutTemplate>

 

 

 

 

 

<fieldset>

 

 

 

 

 

<legend>Terminal Details</legend>

 

 

 

 

 

<asp:PlaceHolder ID="ParentContainer" runat="server" />

 

 

 

 

 

</fieldset>

 

 

 

 

 

</LayoutTemplate>

 

 

 

 

 

<ItemTemplate>

 

 

 

 

 

<table id="Table1" style="width: 750px; height: 40px" runat="server">

 

 

 

 

 

<tr>

 

 

 

 

 

<td style="width: 75%">

 

 

 

 

 

<table id="Table2" style="width: 700px; height: 20px" runat="server">

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label1" runat="server" Text="SITE ID:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label2" runat="server" Text="SITE NAME:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label3" runat="server" Text="ADDRESS:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label4" runat="server" Text="CITY:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label5" runat="server" Text="STATE:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

<%

-- This row is for values of a label --%>

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("SITE_ID")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("SITE_NAME")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("ADDRESS")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("CITY")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("STATE")%>

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td style="width: 75%">

 

 

 

 

 

<table id="Table3" style="width: 700px; height: 20px" runat="server">

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label6" runat="server" Text="PARENT ID:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label7" runat="server" Text="SERIAL 1:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label8" runat="server" Text="SERIAL 2:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label9" runat="server" Text="LUNO:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label10" runat="server" Text="MODE NAME" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("PARENT_ID")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

#Eval("SERIAL1")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("SERIAL2")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("LUNO")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("MODE_NAME")%>

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td style="width: 75%">

 

 

 

 

 

<table id="Table4" style="width: 700px; height: 40px" runat="server">

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label12" runat="server" Text="MODEL NAME:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label13" runat="server" Text="MANUFACTURER NAME:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label14" runat="server" Text="TYPE NAME:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label15" runat="server" Text="PHONE1:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label11" runat="server" Text="PHONE2:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("MODEL_NAME")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("MANUFACTURER_NAME")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("TYPE_NAME")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("PHONE1")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("PHONE2")%>

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td style="width: 75%">

 

 

 

 

 

<table id="Table5" style="width: 700px; height: 40px" runat="server">

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label16" runat="server" Text="PHONE3:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label17" runat="server" Text="PHONE4:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label18" runat="server" Text="COMM DATE 1:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label19" runat="server" Text="COMM DATE 2:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label20" runat="server" Text="TRANS DATE LAST:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("PHONE3")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("PHONE4")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("COMM_DATE_1")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("COMM_DATE_2")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("TRANS_DATE_LAST")%>

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td style="width: 75%">

 

 

 

 

 

<table id="Table6" style="width: 700px; height: 40px" runat="server">

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label21" runat="server" Text="SURCHARGE:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label23" runat="server" Text="BIN EXEMPT:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label24" runat="server" Text="xyz1:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label25" runat="server" Text="xyz2:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label22" runat="server" Text="xyz3:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("SURCHARGE")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("BIN_EXEMPT")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("xyz1")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("xyz2")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("xyz3")%>

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr>

 

 

 

 

 

<td style="width: 75%">

 

 

 

 

 

<table id="Table7" style="width: 700px; height: 40px" runat="server">

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label26" runat="server" Text="AID ACCESS CUST:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label27" runat="server" Text="AID CONTRACT FL:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label28" runat="server" Text="AID CONTRACT SL:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label29" runat="server" Text="AID CONTRACT CASH:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

 

<asp:Label ID="Label30" runat="server" Text="PARENT NAME:" Font-Bold="true"></asp:Label>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

<tr style="width: 100%; height: 20px">

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("AID_ACCESS_CUST")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("AID_CONTRACT_FL")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("AID_CONTRACT_SL")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("AID_CONTRACT_CASH")%>

 

 

</td>

 

 

 

 

 

<td style="width: 140px;" align="left">

 

 

 

 

<%

# Eval("PARENT_NAME")%>

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</td>

 

 

 

 

 

</tr>

 

 

 

 

 

</table>

 

 

 

 

 

</ItemTemplate>

 

 

 

 

 

</telerik:RadListView>

 

 

 

 

 

</asp:Panel>

 

 

 

 

 

</NestedViewTemplate>





 please suggest me ..what different settings are required for PDF...

 

0
Pavlina
Telerik team
answered on 24 Aug 2010, 03:07 PM
Hi Atul,

I tried setting up an export the way you were instructed to and it worked on my side. You can find a sample project attached demonstrating this approach working for a RadGrid with a RadListView in its NestedViewTemplate.

Additionally, you can check if the issue persists when you remove from the RadListView control's ItemTemplate and LayoutTemplate - all tags which are not server controls?

I hope this helps.

Best wishes,
Pavlina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rich
Top achievements
Rank 1
answered on 16 Jun 2016, 12:10 AM
would happen to have an example that work with the MVC Hierarchical grid?
0
Pavlina
Telerik team
answered on 20 Jun 2016, 11:37 AM
Hello,

To see the example on how to export all expanded detail Grids you can refer to this Visual Studio project below:
https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/detail-grid-excel-export

Another project that shows how to export all pages and all expanded detail Grids is available here:
https://github.com/telerik/ui-for-aspnet-mvc-examples/tree/master/grid/detail-grid-excel-export-all-pages-all-details

I hope this helps.

Regards,
Pavlina
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Grid
Asked by
Murad Ajani
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Murad Ajani
Top achievements
Rank 1
Pavlina
Telerik team
Kris
Top achievements
Rank 1
Atul
Top achievements
Rank 1
Rich
Top achievements
Rank 1
Share this question
or