Hello,
I want to create a combobox control at runtime and bind it to a DomainDataSource.
The control is visible and items are visible, but the selected item is not set.
What am i doing wrong here?
With regards,
Pim
I want to create a combobox control at runtime and bind it to a DomainDataSource.
The control is visible and items are visible, but the selected item is not set.
What am i doing wrong here?
Binding binding2 = new Binding();
PropertyPath path2 = new PropertyPath("sFieldName");
binding2.Path = path2;
binding2.NotifyOnValidationError =
true;
binding2.ValidatesOnExceptions =
true;
binding2.TargetNullValue =
"";
binding2.Mode =
BindingMode.TwoWay;
binding2.Source = DomainDataSourceName;
combobox.SelectedValuePath =
"Tag";
With regards,
Pim