I have a TextBox where I get the client id and also have a DataGrid where it has some personal information. Well that's fine, what I can not do is connect the two in the following way:
When I change the value of the TextBox (client id) changing focus, it would have to change the DataGrid data according to the selected client in the TextBox<TextBox Text="{Binding ElementName=dataGridTelefones,
Path=SelectedItem.id_empresa,
NotifyOnSourceUpdated=True}"
Name="textCodigo" />
<DataGrid AutoGenerateColumns="False" HorizontalAlignment="Left"
Margin="12,12,0,0" VerticalAlignment="Top"
ItemsSource="{Binding}" Name="dataGridTelefones" Height="100"
Canvas.Left="113" Canvas.Top="539"
Width="938" FontWeight="Normal" GridLinesVisibility="All"
IsReadOnly="True" IsSynchronizedWithCurrentItem="True">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=prefixo}"
Header="Prefixo" />
<DataGridTextColumn Binding="{Binding Path=telefone}"
Header="Telefone" />
<DataGridTextColumn Binding="{Binding Path=obs}"
Header="Observações" />
</DataGrid.Columns>
</DataGrid>
Could anyone help me?