Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

about Listbox control "unwanted" behaviour

Status
Not open for further replies.

jamin20

Programmer
Feb 13, 2012
14
CH
Hi there,
I'm usin VS2010 and Vb.net and i'm facing some issues with the Listox control:
1- i have a LeftListBox (LLB) from which I can copy items to two different RightListBoxes (RLB) with specific buttons for each RLB.
The "unwanted" behaviour is that when I copy items from LLB to the 2nd RLB, the 1st RLB gets its content cleared ?
2- I have 2 listbox controls, when I test them apart I can *append* new items to those already moved. When I insert them in an existing page *appending* items empties the targetted listbox.

any idea ?
thx
 
Are you trying to append items to a listbox that already has items in it that were populated from the DB or some other datasource.
You need to provide more information and any relevant code.
 
Hi jbenson001,
thanx for your reply.
In my testing it was simple listboxes that I fed manually with listItems => I could not make it work.
at a later stage I will have to deal with records that come from a db in the right listbox to which I may append or remove listitems.
regards.
 
hi there,
I've found the reason of my problems: the contentPlaceHolder was having enableVewState=False !!!
so stupid !
 
Ahhh that would do it. Since the ContentPlaceHolder is the parent object, it's viewstate property will propagate down to child objects. Your're best off setting that property one each object individually.

Glad you found it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top