Pomogite vospolzovatsja SuspendBinding()...

Sontjik
Дата: 06.10.2005 17:36:55
immejutsja : combobox i 2 datatimepicker

Combobox zapolnjajetsja tak:
private void FillItems(ComboBox cmb) //Combobox with batch
		{
			cmb.Items.Clear();
			dvBatch = new DataView(this.dataSet11.Tables["Batch"]);
			cmb.DataSource = dvBatch;
			dvBatch.RowFilter = "StartTime >= '"+ this.dateTimePicker_fra.Value+"' AND  StartTime <= '"+ this.dateTimePicker_til.Value+"'  AND Status =2";
			dvBatch.Sort = "Batch";
			cmb.DisplayMember = "Batch";
			cmb.ValueMember = "BatchID";
			comboBox4.SelectedValueChanged +=new EventHandler(comboBox4_SelectedValueChanged);
		}

t.e. mi ego svjazivajem s dataset.

a teper nado pomenjat znachenije v odnom iz datatimepickerov (ili v oboih)
pri smene voznikajet owibka:
Cannot modify the Items collection when the DataSource property is set.


t.e predlagajut otvjazat ego pri pomoschi SuspendBinding(), pomenjat dannije a potom zanovo ego zavjazat.

pomogite eto sdelat, a to moj kod emu ne nravitsja:
BindingManagerBase bm=BindingContext [this.dataSet11, "Batch"];
			bm.SuspendBinding();
			FillItems(comboBox4);
			bm.ResumeBinding();