开发者

WPF Toolkit Datagrid doesn't show splitter icon on columns

For WPF datagrid I am using following lines of code in xaml file. I have set the resize property of columns in datagrid to true. Still it doesn't show splitter icon on columns of datagrid.

<WPFToolkit:DataGrid CanUserAddRows="False" Background="GhostWhite"  
                     VirtualizingStackPanel.IsVirtualizing="True" 
                     VirtualizingStackPanel.VirtualizationMode="Recycling" 
                     MouseDoubleClick="gridSearchClinet_MouseDoubleClick"
                     CanUserResizeColumns="True" CanUserReorderColumns="False" 
                     Sorting="gridSearchClinet_Sorting" CanUserResizeRows="False"
                     ItemsSource="{Binding}" IsReadOnly="True"
                     CanUserSortColumns="True" CanUserDeleteRows="False" 
                     x:Name="gridSearchClinet" AutoGenerateColumns="False"
                     Margin="10,65,11,50">

    <WPFToolkit:DataGrid.RowStyle>
        <Style TargetType="{x:Type WPFToolkit:DataGridRow}">
            <Style.Triggers>
                <Trigger Property="WPFToolkit:DataGridCell.IsSelected" Value="True">
                    <Setter Property="Background" Value="LightBlue" />
                    <Setter Property="Foreground" Value="Black" />
                </Trigger>
            </Style.Triggers>
        </Style>
    </WPFToolkit:DataGrid.RowStyle>

    <WPFToolkit:DataGrid.Columns开发者_开发百科>
        <WPFToolkit:DataGridTextColumn Header="Division" Width="70" 
                                       CanUserResize="True" CanUserReorder="False"  
                                       CanUserSort="True" Binding="{Binding Spart}" />

        <WPFToolkit:DataGridTemplateColumn Header="Description" CanUserResize="True"
                                           Width="325" CanUserSort="True"
                                           CanUserReorder="False"
                                           SortMemberPath="Description">
            <WPFToolkit:DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <Label HorizontalAlignment="Left" Width="1000"
                           VerticalAlignment="Center" BorderThickness="0"
                           Content="{Binding Path=Description}" FontSize="9" 
                           ToolTip="{Binding Path=Description}" />
                </DataTemplate>
            </WPFToolkit:DataGridTemplateColumn.CellTemplate>
        </WPFToolkit:DataGridTemplateColumn>
        <WPFToolkit:DataGridTextColumn Header="PG" Width="50" CanUserResize="True"
                                       CanUserReorder="False" CanUserSort="True"
                                       Binding="{Binding Konda}" />

        <WPFToolkit:DataGridTextColumn Header="BCC" Width="50" CanUserResize="True"
                                       CanUserReorder="False" CanUserSort="True" 
                                       Binding="{Binding IhKomp}" />

        <WPFToolkit:DataGridTemplateColumn Header="Booking Unit" CanUserResize="True"
                                           Width="735" CanUserSort="True"
                                           SortMemberPath="Beinh">
            <WPFToolkit:DataGridTemplateColumn.CellTemplate>
                <DataTemplate>
                    <Label HorizontalAlignment="Left" Width="1000"
                           VerticalAlignment="Center" BorderThickness="0" 
                           Content="{Binding Path=Beinh}" FontSize="9" 
                           ToolTip="{Binding Path=Beinh}" />
                </DataTemplate>
            </WPFToolkit:DataGridTemplateColumn.CellTemplate>
        </WPFToolkit:DataGridTemplateColumn>
    </WPFToolkit:DataGrid.Columns>
</WPFToolkit:DataGrid>

Any help is highly appreciated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜