Rowfilter
-
Hi, My combobox is bound to a dataset1.tables[0].defaultview. The values of my combobox to dataset2.tables[0].defaultview. During inserting i set the rowfilter of dataset2.tables[0].defaultview which works fine. The nbr of items in the combobox is limited to the records i filtered. After choosing a selection and after edit, my combobox.selectedvalue = 147 (the unique key in the dataset.) But when i set the rowfilter back to string.empty my selectedValue of my combobox becomes <null> but in the combobox there's still the correct last selected text. Result is that i get an error if i want to edit the same record again, even when everything looks fine to the user. So it seems that the binding is mixed up or so. Anyone any idea what goes wrong ? Thx Kurt
-
Hi, My combobox is bound to a dataset1.tables[0].defaultview. The values of my combobox to dataset2.tables[0].defaultview. During inserting i set the rowfilter of dataset2.tables[0].defaultview which works fine. The nbr of items in the combobox is limited to the records i filtered. After choosing a selection and after edit, my combobox.selectedvalue = 147 (the unique key in the dataset.) But when i set the rowfilter back to string.empty my selectedValue of my combobox becomes <null> but in the combobox there's still the correct last selected text. Result is that i get an error if i want to edit the same record again, even when everything looks fine to the user. So it seems that the binding is mixed up or so. Anyone any idea what goes wrong ? Thx Kurt
combobox.Text = "";
should fix you up.Just because we can; does not mean we should.
-
combobox.Text = "";
should fix you up.Just because we can; does not mean we should.
thx mate and a happy new year. Kurt