private void txtCus_Number_GotFocus(object sender, RoutedEventArgs e) >> { >> this.txtCus_Number.Visibility = Visibility.Hidden; >> this.autoCustomers.Visibility = Visibility.Visible; >> this.autoCustomers.Focus(); >> >> } >> >> private void autoCustomers_LostFocus(object sender, RoutedEventArgs e) >> { >> this.autoCustomers.Visibility = Visibility.Hidden; >> this.txtCus_Number.Visibility = Visibility.Visible; >> >> } >>>>
<ctr:AutoComplete x:Name="autoCustomers" Grid.Row="3" Grid.Column="1" SelectedValuePath="cus_pk" DisplayMemberPath="cus_number" SelectedValue="{Binding inv_cusfk, Mode=Default}" PatternChanged="autoCustomers_PatternChanged" Delay="500" LostFocus="autoCustomers_LostFocus" />I am trying to show the customer number of the related customer from on the Invoice screen. inv_cusfk is the field in the invoice table (and invoice entity) that holds the primary key of the customer table/entity.
<ctr:AutoComplete x:Name="autoCustomers" Grid.Row="3" Grid.Column="1" SelectedValuePath="cus_pk" DisplayMemberPath="cus_number" SelectedValue="{Binding cus_number, Mode=Default}" PatternChanged="autoCustomers_PatternChanged" Delay="500" LostFocus="autoCustomers_LostFocus" />But that doesn't work either. :(