blanking a listbox

U

UpRider

I have a gridview that supplies a parameter to a query that populates a
listbox via a sqlDataSource. Works fine. When I change the page of the
gridview (and I deselect the gridview row via code in the pagechange event),
the existing rows in the listbox remain there, even though no row in the
gridview is selected. How do I fix this? Listbox.databind after deselecting
the gridview row does not work.
TIA,
UpRider
 
G

Guest

I have a gridview that supplies a parameter to a query that populates a
listbox via a sqlDataSource.  Works fine.  When I change the page of the
gridview (and I deselect the gridview row via code in the pagechange event),
the existing rows in the listbox remain there, even though no row in the
gridview is selected.  How do I fix this? Listbox.databind after deselecting
the gridview row does not work.
TIA,
UpRider

Add ListBox1.Items.Clear() to PageIndexChanging event. This would
remove all items from the listbox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top