2
如何使這個模板放在資源:RadGridView模板資源
<telerikGridView:RadGridView x:Name="MyGridView" ItemsSource="{Binding MySource}" AutoGenerateColumns="False">
<telerik:RadGridView.Columns>
<telerikGridView:GridViewColumn Header="Id">
<telerikGridView:GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding ID}" />
</DataTemplate>
</telerikGridView:GridViewColumn.CellTemplate>
</telerikGridView:GridViewColumn>
<telerikGridView:GridViewColumn Header="Name">
<telerikGridView:GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding NAME}" />
</DataTemplate>
</telerikGridView:GridViewColumn.CellTemplate>
</telerikGridView:GridViewColumn>
</telerik:RadGridView.Columns>
</telerikGridView:RadGridView>
我有2個有相同tamplate其他網格。