Using the Product List control

Create the Interest tab in the Accountviewer form and drag the ProductList control you've created into the tab frame. As the ProductList control is capable of retrieving the list of Products from the database on its own, the only data you need to bind to this control would be the user selection XML, contained in the BaseAccount. InterestedProds field. You can do this in the SetupBindings() method of the Accountviewer form:

public void SetupBindings() {

AccountBindingSource.DataSource = typeof(BaseAccount); AccountBindingSource.Add(_account);

plProducts.DataBindings.Add(new Binding("DataSource", AccountBindingSource, "InterestedProds", true));

Was this article helpful?

0 0

Post a comment