I have ComboBox binded to 1 datatable(1 column "Country") and listbox binded to another 1(2 columns "Name", "Country"). How to make listbox filter on selected item in combo box changes?
For example:
combobox values: GER, POL, RUS
datatable binded to listbox:
Name | Country
John | GER
Luke | POL
Sasha| RUS
CJ | GER
Carl | POL
when I choose GER in combobox I want to refresh listbox to see only:
John
CJ
I used already filter to datatable
dataSet.Tables["Name"].DefaultView.RowFilter = "Country Like '%" + comboBoxFilter.Text + "%' ";
But I have result delayed by 1 click.
change to | result
GER | no change
POL | now I see GER names
RUS | now I see POL names
POL | now I see RUS names
Why it is delayed?