Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Focusing on the control of DatagridTemplate Column and Key Navigation between the controls of Template column

$
0
0

Hi Friends,

I have DataGrid with DataGridTemplate column, Which has multiple controls in it, So Whenever GridCell got Focused need to focus on firsdt control in a Template. Kindly suggest.

                                    

 <DataGridTemplateColumn  Header="Test" Width="Auto" HeaderTemplate="{StaticResource Template1}">
                        <DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Loaded="StackPanel_LayoutUpdated" Grid.Row="1" Orientation="Horizontal" TargetUpdated="StackPanel_TargetUpdated">
                                    <ContentControl IsTabStop="False" DataContext="{Binding Source1}"  Template="{StaticResource GridCellTemplate}"></ContentControl>
                                    <ContentControl IsTabStop="False" DataContext="{Binding Source2}" Template="{StaticResource GridCellTemplate}"></ContentControl>

</<DataTemplate>

</DataGridTemplateColumn.CellTemplate>

 <ControlTemplate x:Key="GridCellTemplate" >
        <cTextBox BorderThickness="0.5" BorderBrush="Gray"  Text="{Binding Value,Mode=TwoWay, UpdateSourceTrigger=LostFocus}" Width="101" TextAlignment="Center">

</ControlTemplate 



Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>