468,133 Members | 1,574 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

Clearing items before refreshing dataset from listbox

Hi

I have a ListBox which is binded to a dataSet. When I need to refresh
this dataSet, it works, but the old entries don't get removed from the
listbox. Items.Clear() doesn't work when a DataSource is set.

How would I clear all the items from the ListBox before refreshing the
dataset?

thanks
Jun 27 '08 #1
1 2295
Hi

ListBox is a mirror of dataset in this case. If you want to clear listbox
clear the source, or just detach.

Regards, Alex
[TechBlog] http://devkids.blogspot.com

sHi
s>
sI have a ListBox which is binded to a dataSet. When I need to refresh
sthis dataSet, it works, but the old entries don't get removed from
sthe listbox. Items.Clear() doesn't work when a DataSource is set.
s>
sHow would I clear all the items from the ListBox before refreshing
sthe dataset?
s>
sthanks
s>
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by gdbjohnson-AT-yahoo-dot-ca-nospamplz | last post: by
3 posts views Thread by Brad | last post: by
3 posts views Thread by Baren | last post: by
2 posts views Thread by amber | last post: by
reply views Thread by Tony Botelho | last post: by
3 posts views Thread by Angel Blue01 | last post: by
5 posts views Thread by BlackBox | last post: by
2 posts views Thread by gnosys | last post: by
27 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.