This question is locked. New answers and comments are not allowed.
Hi,
I am relatively new to Siliverlight and have been trying to make use of it since some time.
I have a Telerik grid (RadGridView) and was trying to export the grid rows to excel (as csv).
However, if I use a "GridViewColumn", I do not get that column in the exported list.
What could be wrong? please help....
e.g...
<UserControl x:Class="SilverlightApplication48.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:local="clr-namespace:SilverlightApplication48"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
d:DesignHeight="300" d:DesignWidth="400">
<UserControl.Resources>
<local:ColorConverter x:Key="cnv" />
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<telerik:RadGridView x:Name="testGrid" AutoGenerateColumns="False">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}"/>
<telerik:GridViewDataColumn Header="Rank" DataMemberBinding="{Binding Rank}">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Rank}"/>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
<telerik:GridViewColumn Header="Place"
IsReorderable="False"
IsFilterable="False"
UniqueName="MyPlace">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Place}" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
<telerik:GridViewColumn.CellEditTemplate>
<DataTemplate>
<TextBox Text="{Binding Place}"/>
</DataTemplate>
</telerik:GridViewColumn.CellEditTemplate>
</telerik:GridViewColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
<Button Content="Export" Click="Button_Click" Grid.Row="1"/>
</Grid>
</UserControl>
I am relatively new to Siliverlight and have been trying to make use of it since some time.
I have a Telerik grid (RadGridView) and was trying to export the grid rows to excel (as csv).
However, if I use a "GridViewColumn", I do not get that column in the exported list.
What could be wrong? please help....
e.g...
<UserControl x:Class="SilverlightApplication48.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:local="clr-namespace:SilverlightApplication48"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
d:DesignHeight="300" d:DesignWidth="400">
<UserControl.Resources>
<local:ColorConverter x:Key="cnv" />
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<telerik:RadGridView x:Name="testGrid" AutoGenerateColumns="False">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Name}"/>
<telerik:GridViewDataColumn Header="Rank" DataMemberBinding="{Binding Rank}">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Rank}"/>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
<telerik:GridViewColumn Header="Place"
IsReorderable="False"
IsFilterable="False"
UniqueName="MyPlace">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Place}" />
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
<telerik:GridViewColumn.CellEditTemplate>
<DataTemplate>
<TextBox Text="{Binding Place}"/>
</DataTemplate>
</telerik:GridViewColumn.CellEditTemplate>
</telerik:GridViewColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
<Button Content="Export" Click="Button_Click" Grid.Row="1"/>
</Grid>
</UserControl>