G
Guest
I have a windows form with 5 fields. They are bound as follows:
drvDetail = (DataRowView) cm.Current;
vueDetail = drvDetail.DataView;
this.BindingContext[vueDetail].Position = cm.Position;
txtSON.DataBindings.Add("Text", vueDetail, "service-order-number");
txtTaskID.DataBindings.Add("Text", vueDetail, "taskid");
txtServiceDesc.DataBindings.Add("Text", vueDetail, "task-desc");
txtStartDate.DataBindings.Add("Text", vueDetail, "start-date");
txtStartTime.DataBindings.Add("Text", vueDetail, "start-time");
txtCompDate.DataBindings.Add("Text", vueDetail, "complete-date");
txtCompTime.DataBindings.Add("Text", vueDetail, "complete-time");
txtServiceCost.DataBindings.Add("Text", vueDetail, "task-cost");
The problem is I fill in the field data as follows:
LoadData();
cbServices.DataSource = dvServices;
cbServices.DisplayMember = "service-description";
cbServices.ValueMember = "service-nbr";
The data appears in the text box ok, but when I save it the fields are null.
If I key in the data its works just fine, what am I doing wrong?? Please
Help!!!
drvDetail = (DataRowView) cm.Current;
vueDetail = drvDetail.DataView;
this.BindingContext[vueDetail].Position = cm.Position;
txtSON.DataBindings.Add("Text", vueDetail, "service-order-number");
txtTaskID.DataBindings.Add("Text", vueDetail, "taskid");
txtServiceDesc.DataBindings.Add("Text", vueDetail, "task-desc");
txtStartDate.DataBindings.Add("Text", vueDetail, "start-date");
txtStartTime.DataBindings.Add("Text", vueDetail, "start-time");
txtCompDate.DataBindings.Add("Text", vueDetail, "complete-date");
txtCompTime.DataBindings.Add("Text", vueDetail, "complete-time");
txtServiceCost.DataBindings.Add("Text", vueDetail, "task-cost");
The problem is I fill in the field data as follows:
LoadData();
cbServices.DataSource = dvServices;
cbServices.DisplayMember = "service-description";
cbServices.ValueMember = "service-nbr";
The data appears in the text box ok, but when I save it the fields are null.
If I key in the data its works just fine, what am I doing wrong?? Please
Help!!!