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

Exporting data when column bound to static resource

1 Answer 44 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tim
Top achievements
Rank 1
Tim asked on 14 Feb 2013, 08:47 PM
I have a gridview where I have one column where I display data from a static resource.  The data displays fine in the table but when I export, the data value is null.

                    <telerikGrid:GridViewDataColumn Header="Tract Project Number" UniqueName="TractProjectNumber" IsFilterable="False" x:Name="tractprojectnumbercolumn"> 
                        <telerikGrid:GridViewDataColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Visibility="Visible" >
                                    <TextBlock Text="{Binding Source={StaticResource simpletractprojectnumberclass}, Path=TractProjectNumber}" VerticalAlignment="Center"/>
                                </StackPanel>
                            </DataTemplate>
                        </telerikGrid:GridViewDataColumn.CellTemplate>
                    </telerikGrid:GridViewDataColumn>

When  "private void ElementExporting(object sender, GridViewElementExportingEventArgs e)" is called, e.Value for my table cell with the staticresource is null.

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 15 Feb 2013, 07:27 AM
Hi,

 Exporting will work directly with the grid data - templates cannot be exported. 

Regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Tim
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or