Hi all,
I change my gridviewrow template successfully but the gridview disable selection. I need my gridview can enable multi selection mode.
I use
<ControlTemplate x:Key="CustomRowTemplate"
TargetType="telerik:GridViewRow">
<Border x:Name="rowsContainer"
Background="Transparent"
BorderThickness="0,0,0,1"
Padding="1">
<Grid Width="Auto"
HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition MinWidth="150" Width="Auto" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0"
Grid.RowSpan="3"
Grid.Row="0"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Height="60"
Width="60"
Margin="15,0"
BorderThickness="1"
CornerRadius="1"
BorderBrush="Black">
</Border>
<TextBlock Text="Device Name: "
Margin="5,0,0,0"
FontWeight="Bold"
Grid.Row="0"
Grid.Column="1"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
<TextBlock Text="{Binding UserName}"
Margin="5,0,0,0"
Grid.Row="0"
Grid.Column="2"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
<TextBlock Text="Source: "
Margin="5,0,0,0"
FontWeight="Bold"
Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
<TextBlock Text="{Binding LastLoginDate}"
Margin="5,0,0,0"
Grid.Row="1"
Grid.Column="2"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
</Grid>
</Border>
</ControlTemplate>
<Style TargetType="telerik:GridViewRow" >
<Setter Property="Template" Value="{StaticResource CustomRowTemplate}" />
</Style>
to change gridivewrow template and this make my gridivew can not have selection function.
If any one have experiences in this. Please help me, thanks
I change my gridviewrow template successfully but the gridview disable selection. I need my gridview can enable multi selection mode.
I use
<ControlTemplate x:Key="CustomRowTemplate"
TargetType="telerik:GridViewRow">
<Border x:Name="rowsContainer"
Background="Transparent"
BorderThickness="0,0,0,1"
Padding="1">
<Grid Width="Auto"
HorizontalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition Height="20" />
<RowDefinition Height="20" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition MinWidth="150" Width="Auto" />
<ColumnDefinition Width="10" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border Grid.Column="0"
Grid.RowSpan="3"
Grid.Row="0"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
Height="60"
Width="60"
Margin="15,0"
BorderThickness="1"
CornerRadius="1"
BorderBrush="Black">
</Border>
<TextBlock Text="Device Name: "
Margin="5,0,0,0"
FontWeight="Bold"
Grid.Row="0"
Grid.Column="1"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
<TextBlock Text="{Binding UserName}"
Margin="5,0,0,0"
Grid.Row="0"
Grid.Column="2"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
<TextBlock Text="Source: "
Margin="5,0,0,0"
FontWeight="Bold"
Grid.Row="1"
Grid.Column="1"
HorizontalAlignment="Left"
VerticalAlignment="Center" />
<TextBlock Text="{Binding LastLoginDate}"
Margin="5,0,0,0"
Grid.Row="1"
Grid.Column="2"
VerticalAlignment="Center"
HorizontalAlignment="Left" />
</Grid>
</Border>
</ControlTemplate>
<Style TargetType="telerik:GridViewRow" >
<Setter Property="Template" Value="{StaticResource CustomRowTemplate}" />
</Style>
to change gridivewrow template and this make my gridivew can not have selection function.
If any one have experiences in this. Please help me, thanks