By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,654 Members | 1,583 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,654 IT Pros & Developers. It's quick & easy.

Updating listbox bound to IList

P: n/a
Hello, I am trying to update my listbox whenever I remove something from the
underlying datasource (IList). I understand that you must use the
SuspendBinding and ResumeBinding methods of the BindingContext to accomplish
this but I think I am doing something wrong:

Dim bc As BindingManagerBase = BindingContext(MyClass)
bc.SuspendBinding()
MyClass.Remove(ListBox1.SelectedItem)
bc.ResumeBinding()

The item is getting removed from my class but the listbox never updates.

Am I using the BindingContext incorrectly?

Thanks!!
Nov 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Brian,

Is it absolutly necessary to use an Ilist.
When you use the datatable binded to a dataview (which is very easy to make
also without an underlaying database table) most things are working much
easier.

(Why easier, just because you can also very easy use the datavalue from the
listbox and the benefits of the dataview as sorting and hidding)

Just my thoughts?

Cor
Nov 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.