Hi everyone,
I'm working on cutting down code in a form I'm working on, and decided to
bind the controls to a dataset. I have two problems now. I have a couple
datasets that I'm binding to.
1. I have all databinding properties set for the control. When I fill the
dataset, there is now data showing up in the control. I'm using this code to
load the dataset:
With daIndTreatPlan1.SelectCommand.Parameters
.Item("@PatientId").Value = cmbPatientSelect.Columns(0).Value
End With
DsIndTreatmentPlan1.IndivdualizedTreatmentPlan.Clear
isDatesLoading = True
daIndTreatPlan1.Fill(DsIndTreatmentPlan1.IndivdualizedTreatmentPlan )
isDatesLoading = False
If DsIndTreatmentPlan1.IndivdualizedTreatmentPlan.Rows.Count > 0 then
cmbTreatmentPlanDate.SelectedIndex = 0
End If
All the controls are set properly to get the data off the
DsIndTreatmentPlan1 dataset. These controls worked fine until the original
dataset of deleted off the form, but since then I have recreated the dataset
and reset the databinding properties for all the control. But again the
controls display no data when I know there is data. What could this be?
2. I also need a hand with the cursor movement. I have report Date Combobox,
when the user selects a date, I'd like the controls that are bound to the
save dataset to move to the record that was selected from the combo, but the
only data that changes is the data in the combo. In other words, the other
controls are not keeping up with the cursor. I beleive I will have to use the
CurrencyManager to handle the cursor position, But how would I sync the
cursor with the seleted item in the combobox?
Thanks for any suggestion that you could offer.
Michael Lee
|