468,790 Members | 1,848 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,790 developers. It's quick & easy.

Updating listbox bound to IList

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
1 1075
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.

Similar topics

1 post views Thread by Noah Coad [MVP & MCP] | last post: by
reply views Thread by Jesse Martinez | last post: by
6 posts views Thread by Chris Leuty | last post: by
1 post views Thread by VB Programmer | last post: by
7 posts views Thread by Dave | last post: by
1 post views Thread by Spock | last post: by
2 posts views Thread by Alien2_51 | last post: by
1 post views Thread by john wright | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.