Paul,
When checking the value in the textbox, have you left the focus of the
textbox? The value will not be written to the dataset until the focus is
lost (more specifically, when validation is complete, which usually happens
when focus is lost).
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Paul Slavin said:
thanks for your reply... heres a bit more detail
I'm binding to a dataview:
this.rgiDataView = new DataView();
this.rgiDataView.Table = this.ds.Tables["ATPBlockOrOL"];
this.rgiNormTxtBox.DataBindings.Add( "text", rgiDataView, "RailGapIndicatorId" );
and I change the view in the textbox based on the currently selected item
in a combobox on the same form:
this.rgiDataView.RowFilter = "BlockOrOLId = '" +
this.blockIdComboBox.SelectedValue + "'";
when I change the selection in the combobox, the text in the text box
changes correctly, but when I change text in the textbox the changes aren't
reflected in the dataset. Am I doing something fundamentaly wrong?
If I do exactly the same thing but binding to a datagrid rather than the
textbox it updates the dataset correctly
:
Paul,
If you are not using binding context, then how are you binding to the
data set? The DataBindings collection and the BindingContext classes are
tied together, and you can't really have one without the other.
What exactly are you doing in order to create a data binding?
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
I have a textbox bound to a dataview, when I update the text in the
textbox no changes take place in the underlying dataset. Why is this??
any answers appreciated, as to due to the underlying structure of the
datasets, i.e lots of child tables etc, I cannot use bindingcontext