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

Hierarchial gridview export to excel for all data in silverlight5

0 Answers 20 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Koti
Top achievements
Rank 1
Koti asked on 16 Aug 2012, 11:44 AM

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>

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Koti
Top achievements
Rank 1
Share this question
or