I need use CellTemplate in my grid...I can´t set Tag in GridViewHyperlinkColumn, for example...
Can I sort grid columns using CellTemplate?? I can´t... Why?
Can I use
DataMemberBinding with CellTemplate to resolve it??
Thanks!!
<
UserControl x:Class="Sample.SilverlightControl1"
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"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:my="clr-namespace:Sample"
mc:Ignorable="d" d:DesignHeight="400" d:DesignWidth="600">
<UserControl.Resources>
<my:MyViewModel x:Key="MyViewModel"/>
<DataTemplate x:Key="NameTemplate" >
<HyperlinkButton Tag="1" Content="{Binding Name}" IsTabStop="False" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0,3,0,3" />
</DataTemplate>
</UserControl.Resources>
<Grid x:Name="LayoutRoot" Background="White" DataContext="{StaticResource MyViewModel}">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<telerik:RadGridView Grid.Row="0" x:Name="PlayersGrid" AutoGenerateColumns="False" Margin="5" ShowGroupPanel="False" SelectionUnit="Cell" RowIndicatorVisibility="Collapsed">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn x:Name="RadColumnName" Width = "*" Header="Name" CellTemplate="{StaticResource NameTemplate}" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>
<telerik:RadDataPager x:Name="radDataPager" Grid.Row="1" Source="{Binding Items, ElementName=PlayersGrid}" PageSize="2" DisplayMode="All" />
</Grid>
</
UserControl>