Hierarchial gridview export to excel for all data in silverlight5

1 posts, 0 answers
  1. Koti
    Koti avatar
    8 posts
    Member since:
    Jul 2012

    Posted 16 Aug 2012 Link to this post


    Hi,
    I have the following hierarchical radgridview .
    I want to export the data of parent grid view and child grid view to excel sheet.
    When i tried only parent grid's data is exporting.

    <telerik:RadGridView Grid.Row="1" x:Name="radJobDetails" telerik:StyleManager.Theme="Summer" ShowGroupPanel="False" Height="400" ItemsSource="{Binding service}" EnableColumnVirtualization="False"
                                 RowStyle="{StaticResource radGridRow}" AlternateRowStyle="{StaticResource radGridAltRow}" AlternationCount="2"  AutoGenerateColumns="False"
                                 RowIsExpandedChanged="radJobDetails_RowIsExpandedChanged" ElementExported="radJobDetails_ElementExported">
                    <telerik:RadGridView.ChildTableDefinitions>
                        <telerik:GridViewTableDefinition>
                            <telerik:GridViewTableDefinition.Relation>
                                <telerik:PropertyRelation ParentPropertyName="uaudioid"></telerik:PropertyRelation>
                            </telerik:GridViewTableDefinition.Relation>
                        </telerik:GridViewTableDefinition>
                    </telerik:RadGridView.ChildTableDefinitions>
                    <telerik:RadGridView.Columns>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding uaid}" Header="AID" Width="100" IsReadOnly="True"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding uaname}" Header="AName" Width="300" />
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ufname}" Header="FName"  Width="300"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ums}" Header="Mins"  Width="100"/>
                        <telerik:GridViewDataColumn DataMemberBinding="{Binding ulcnt}" Header="LCount"  Width="100"/>
                    </telerik:RadGridView.Columns>
                    <telerik:RadGridView.HierarchyChildTemplate>
                        <DataTemplate x:Name="useraudioprivilages">
                            <telerik:RadGridView x:Name="radUserPrivilageActions" AutoGenerateColumns="False" ShowGroupPanel="False" ItemsSource="{Binding service}"
                                             RowStyle="{StaticResource radGridRow}" AlternateRowStyle="{StaticResource radGridAltRow}" AlternationCount="2" Loaded="radUserPrivilageActions_Loaded">
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding afilename}" Header="AFName" Width="300" />
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding auname}" Header="UName"  Width="150"/>
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding aadtime}" Header="Assigned Time"  Width="150"/>
                                    <telerik:GridViewDataColumn DataMemberBinding="{Binding awpname}" Header="Privilage"  Width="200"/>
                                </telerik:RadGridView.Columns>
                            </telerik:RadGridView>
                        </DataTemplate>
                    </telerik:RadGridView.HierarchyChildTemplate>
                </telerik:RadGridView>

Back to Top