Problem with databound listbox.

K

Ken Varn

I have a strange problem with a databound listbox. It may be because of how
I use it, but I am stumped by this behavior. Here is the scenario:

I have a multiselect databound listbox that belongs to a panel control. In
the Page_Load event, the panel listbox control may be moved from one panel
to another depending on selections that the operator makes. Everything
seems to work fine except for one thing. The selections that are made in
the listbox are not retained on postback. They are always cleared. If I
remove the databinding from the listbox and place items in it manually, then
it works fine. I do not do databinding if Page.IsPostback is set to true.
Can someone explain why it does not retain selections on postback? I
suspect it is because I am moving the listbox control to a new parent, but I
don't understand why this is causing a problem.


--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top