V
Vanessa
Hi All!
I am with a situation where I am not getting the right updating to the
form's fields. The situation is the following one:
I have one combobox and one textbox. I am using the CurrentChanged event of
the BindingSource of the combobox to update the textbox. When selecting an
item in the combobox or when selecting a row in the grid, it is updating the
textbox correctly. The problem is when I apply a filter in the grid, and then
the grid has no rows. I already made the following attempts:
- When there is no row in the grid, the event is not called, and textbox
mantains the previous content;
- If I call the CurrentChanged event directly when there is no rows in the
grid, in this case I clean up the textbox, but when I apply a filter again in
the grid and the position of the combobox does not modify (that is, it is in
the same register), the CurrentChanged is not called, and edit is blank
(because I cleaned before);
- I already tried to use “combo.SelectedIndex = -1†but also did not worked.
Does someone has any idea of how can I solve this situation?
Thank you for any suggestion!
Vanessa
I am with a situation where I am not getting the right updating to the
form's fields. The situation is the following one:
I have one combobox and one textbox. I am using the CurrentChanged event of
the BindingSource of the combobox to update the textbox. When selecting an
item in the combobox or when selecting a row in the grid, it is updating the
textbox correctly. The problem is when I apply a filter in the grid, and then
the grid has no rows. I already made the following attempts:
- When there is no row in the grid, the event is not called, and textbox
mantains the previous content;
- If I call the CurrentChanged event directly when there is no rows in the
grid, in this case I clean up the textbox, but when I apply a filter again in
the grid and the position of the combobox does not modify (that is, it is in
the same register), the CurrentChanged is not called, and edit is blank
(because I cleaned before);
- I already tried to use “combo.SelectedIndex = -1†but also did not worked.
Does someone has any idea of how can I solve this situation?
Thank you for any suggestion!
Vanessa