Basically I’m filtering through a BindingSource by input from a TextBox. I’m doing this by doing the following :-
//Filter Results
bindingSource.Filter = "Term1 = '" + textBox1.Text + "'" + "AND Term2='" + textBox2.Text + "'";
loc = bindingSource.Find("term2", textBox2.Text);
BindingSource.Position = loc;
However if I now wish to update the corresponding record in the DataSet by using the BindingSource.Position as an indication to the current row it updates the incorrect row in the data set. I have a feeling that this is down to the fact that I’ve filter results down in the binding source so there’s going to be a mismatch.
How can I get around this?
Well the
BindingSource.Currentshould give you a reference to the row its bound to. But you shouldn’t need to do this since the row should already be updated.