D
Derrick
I have a form with a list box control and a few text
boxes. The controls are bound to a collection. All that
works fine when I load the data from the data base. When
the form loads, I call the 'intiallizeBindings' sub:
<snippet>
txtFirstName.DataBindings.Add("text",
g_Members, "FirstName")
lstMembers.DisplayMember = "FullName"
lstMembers.ValueMember = "ID"
lstMembers.DataSource = g_Members
lstMembers.DataBindings.Add("SelectedValue",
g_Members, "ID")
bmb = Me.BindingContext(g_Members)
bmb.Position = bmb.Count
bmb.Position = 0
</snippet>
I can navigate through the collection using my navigate
buttons or the clicking on the list box.
But when I add an item to the collection (g_members), it
does not refresh the list box or allow navigation to the
new items. Do I have to code something for an event in
the collection? or the binding manager base (bmb)?
Thanks for the help
Derrick
boxes. The controls are bound to a collection. All that
works fine when I load the data from the data base. When
the form loads, I call the 'intiallizeBindings' sub:
<snippet>
txtFirstName.DataBindings.Add("text",
g_Members, "FirstName")
lstMembers.DisplayMember = "FullName"
lstMembers.ValueMember = "ID"
lstMembers.DataSource = g_Members
lstMembers.DataBindings.Add("SelectedValue",
g_Members, "ID")
bmb = Me.BindingContext(g_Members)
bmb.Position = bmb.Count
bmb.Position = 0
</snippet>
I can navigate through the collection using my navigate
buttons or the clicking on the list box.
But when I add an item to the collection (g_members), it
does not refresh the list box or allow navigation to the
new items. Do I have to code something for an event in
the collection? or the binding manager base (bmb)?
Thanks for the help
Derrick