Column header not exported properly for a data bound header

2 posts, 0 answers
  1. Madhu
    Madhu avatar
    30 posts
    Member since:
    May 2011

    Posted 03 Nov 2011 Link to this post


    I have a column in my gridview which needs to display the header dynamically based based on a condition. This is how it is defined
                                            <TextBlock DataContext="{Binding ParentGridView.DataContext, ElementName=GridFinder}" Text="{Binding CoolantTempUnitName, TargetNullValue='Coolant Temp (F)', FallbackValue='Coolant Temp (F)'}" Foreground="White"/>

    But when I export data from this Grid, the header of this column is exported as System.Windows.Controls.StackPanel instead of the actual name. All the other column headers export correctly. Can you please provide a solution for this?

  2. Vlad
    Vlad avatar
    11100 posts

    Posted 03 Nov 2011 Link to this post


     You can catch ElementExporting for this column header and assign desired value to e.Value. You can check our demos for more info. 

    All the best,
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top