Link to home
Start Free TrialLog in
Avatar of Arikael
ArikaelFlag for Switzerland

asked on

changes in datarow update GUI

Hi experts

I'm a bit confused right now, hope you can help me.
I have a bindingsource which points to datatable (quite standard)
several fields of my datarow/databale points to different controls.

How can I acchieve that a change directly in my datarow is reflected in my gui. Do I have to do that myself?

example:
mydatarow["field1"] = "test";

should update the corresponding textfield
ASKER CERTIFIED SOLUTION
Avatar of ToddBeaulieu
ToddBeaulieu
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Arikael

ASKER

hi

yeah, you are right the control points to the datarow respectivly the bindingsource of course.
so, the code
mydatarow["field1"] = "test";

should update the corresponding control?
Right, but only if you've set the binding up correctly. If, for instance, you populated the control with something like "Control.Text = mydatarow["field1"]", you haven't established a binding at all.

That's why I wanted to verify that the binding is correct.
Avatar of Arikael

ASKER

hi

the binding is like:
this.JobFreeTextTextBox.DataBindings.Add("Text", this.MetaBindingSource, "JobFreeText", false, DataSourceUpdateMode.OnPropertyChanged);

I suspect that there is a problem elsewhere in the code
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial