D
David Cotton
I have 4 combo boxes. They are bound like this:
_dvChassisSC0 = new DataView (_dsChassisSC.Tables[0]);
_dvChassisSC1 = new DataView (_dsChassisSC.Tables[0]);
_dvChassisSC2 = new DataView (_dsChassisSC.Tables[0]);
_dvChassisSC3 = new DataView (_dsChassisSC.Tables[0]);
cbSeg0.DataSource = _dvChassisSC0;
cbSeg0.DisplayMember = "DisplayName";
cbSeg0.ValueMember = "chassis_sc_id";
cbSeg1.DataSource = _dvChassisSC1;
cbSeg1.DisplayMember = "DisplayName";
cbSeg1.ValueMember = "chassis_sc_id";
cbSeg2.DataSource = _dvChassisSC2;
cbSeg2.DisplayMember = "DisplayName";
cbSeg2.ValueMember = "chassis_sc_id";
cbSeg3.DataSource = _dvChassisSC3;
cbSeg3.DisplayMember = "DisplayName";
cbSeg3.ValueMember = "chassis_sc_id";
When the user clicks on the "New" button I set the
SelectedValue = 0 (A non-existant value, also I've tried
setting the SelectedInden to -1) Clearing the value in
the control.
As I trace the code (including some traces into the
disassmbler). The selected index is initially set to -1.
Then I see a call being made to the CurrencyManager being
made. Somewhere in here (gee I wish .Net shipped with the
source like MFC), the SelectedIndex is reset to 0.
Things I've tried:
I've tried creating distinct DataSources along with the
distinct DataViews.
I already mentioned I've tried setting both the
SelectedIndex and SelectedValue.
Does anyone have any ideas that I can try?
Thanks,
Dave
_dvChassisSC0 = new DataView (_dsChassisSC.Tables[0]);
_dvChassisSC1 = new DataView (_dsChassisSC.Tables[0]);
_dvChassisSC2 = new DataView (_dsChassisSC.Tables[0]);
_dvChassisSC3 = new DataView (_dsChassisSC.Tables[0]);
cbSeg0.DataSource = _dvChassisSC0;
cbSeg0.DisplayMember = "DisplayName";
cbSeg0.ValueMember = "chassis_sc_id";
cbSeg1.DataSource = _dvChassisSC1;
cbSeg1.DisplayMember = "DisplayName";
cbSeg1.ValueMember = "chassis_sc_id";
cbSeg2.DataSource = _dvChassisSC2;
cbSeg2.DisplayMember = "DisplayName";
cbSeg2.ValueMember = "chassis_sc_id";
cbSeg3.DataSource = _dvChassisSC3;
cbSeg3.DisplayMember = "DisplayName";
cbSeg3.ValueMember = "chassis_sc_id";
When the user clicks on the "New" button I set the
SelectedValue = 0 (A non-existant value, also I've tried
setting the SelectedInden to -1) Clearing the value in
the control.
As I trace the code (including some traces into the
disassmbler). The selected index is initially set to -1.
Then I see a call being made to the CurrencyManager being
made. Somewhere in here (gee I wish .Net shipped with the
source like MFC), the SelectedIndex is reset to 0.
Things I've tried:
I've tried creating distinct DataSources along with the
distinct DataViews.
I already mentioned I've tried setting both the
SelectedIndex and SelectedValue.
Does anyone have any ideas that I can try?
Thanks,
Dave