I currently have two tables:
JobCenter (holds a job number and more importantly - CustomerID pertaining to that job)
Customer (holds addresses etc... with a PK CustomerID)
I created a ComboBox called "custName" and did the following:
this.CustName.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.dsJobCenter, "JOBCENTER.CustID");
this.CustName.DataSource = this.dsJobCenter;
this.CustName.DisplayMember = "CUSTOMERS.CompanyName";
this.CustName.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.CustName.Location = new System.Drawing.Point(80, 24);
this.CustName.Name = "CustName";
this.CustName.Size = new System.Drawing.Size(344, 24);
this.CustName.TabIndex = 12;
this.CustName.ValueMember = "CUSTOMERS.CustID";
I apologize for the bad copy/paste...
but anyway,
The Customers show up in the combobox and the current customer for the job is automatically selected and shown.
HERE IS MY ISSUE: When you change the customer, it doesn't update the dataset.
I placed a datagrid on the same form to view what was going on and it wasn't updating the record UNTIL I clicked somewhere on the datagrid!!! Now, I am trying to figure out what method is called when I click on the datagrid that I can assign to my on_SelectValueChanged even so it updates right away. (and it is NOT the DataSet.Update() method)
Any help appreciated.
JobCenter (holds a job number and more importantly - CustomerID pertaining to that job)
Customer (holds addresses etc... with a PK CustomerID)
I created a ComboBox called "custName" and did the following:
this.CustName.DataBindings.Add(new System.Windows.Forms.Binding("SelectedValue", this.dsJobCenter, "JOBCENTER.CustID");
this.CustName.DataSource = this.dsJobCenter;
this.CustName.DisplayMember = "CUSTOMERS.CompanyName";
this.CustName.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
this.CustName.Location = new System.Drawing.Point(80, 24);
this.CustName.Name = "CustName";
this.CustName.Size = new System.Drawing.Size(344, 24);
this.CustName.TabIndex = 12;
this.CustName.ValueMember = "CUSTOMERS.CustID";
I apologize for the bad copy/paste...
but anyway,
The Customers show up in the combobox and the current customer for the job is automatically selected and shown.
HERE IS MY ISSUE: When you change the customer, it doesn't update the dataset.
I placed a datagrid on the same form to view what was going on and it wasn't updating the record UNTIL I clicked somewhere on the datagrid!!! Now, I am trying to figure out what method is called when I click on the datagrid that I can assign to my on_SelectValueChanged even so it updates right away. (and it is NOT the DataSet.Update() method)
Any help appreciated.