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