G
Guest
I am using a custom collection class to fill a combo box. When I set the
data source properties, the SelectedIndexChanged event is firing for every
item in the collection. Here is a code snippet:
// Collection class
public class ReconcileBatchList : CollectionBase
{
}
// Combo box binding
this.m_ReconcileBatchList = new ReconcileBatchList ( );
this.cbReconcileBatch.DataSource = this.m_ReconcileBatchList;
this.cbReconcileBatch.ValueMember = "ID";
this.cbReconcileBatch.DisplayMember = "BatchDate";
If my collection has 20 items in it, the SelectedIndexChanged event fires 20
times?
data source properties, the SelectedIndexChanged event is firing for every
item in the collection. Here is a code snippet:
// Collection class
public class ReconcileBatchList : CollectionBase
{
}
// Combo box binding
this.m_ReconcileBatchList = new ReconcileBatchList ( );
this.cbReconcileBatch.DataSource = this.m_ReconcileBatchList;
this.cbReconcileBatch.ValueMember = "ID";
this.cbReconcileBatch.DisplayMember = "BatchDate";
If my collection has 20 items in it, the SelectedIndexChanged event fires 20
times?