1
I have a Datagrid List:
<DataGrid Name="GridLista"
Grid.ColumnSpan="20"
Margin="5"
Grid.RowSpan="17"
Grid.Row="3"
CanUserAddRows="False"
CanUserReorderColumns="True"
AutoGenerateColumns="False"
SelectionUnit="FullRow"
SelectionMode="Extended"
ItemsSource="{Binding Path=Lista}"
SelectedValue="{Binding Path=Model, Mode = TwoWay}"
IsReadOnly="True"
>
<DataGrid.Columns>
<DataGridTextColumn Width="0.1*" Binding="{Binding Codigo}" Header="Código"/>
<DataGridTextColumn Width="0.9*" Binding="{Binding Nome}" Header="Nome Operador"/>
</DataGrid.Columns>
</DataGrid>
After clicking on one of the lines, all the textboxes are filled, below one of them:
<TextBox Name="textOperadorNome" Text = "{Binding Model.Nome, Mode = TwoWay, UpdateSourceTrigger=PropertyChanged}" CharacterCasing="Upper" Margin="5" Grid.ColumnSpan="8" Grid.Row="2" Padding="0" VerticalContentAlignment="Center" Grid.Column="4"/>
So far no problem, everything working.
My problem is: whenever it is filled after being clicked on the table, the textbox gets the focus and instead of it placing the cursor at the end of the text, it puts at the beginning, there is some way to fix this problem?