0
Reply

remove listbox valueid on selection of another listbox item

scottich kosmos

scottich kosmos

Sep 9 2012 3:08 PM
976
I have a form which has 2 listboxs, textbox and 2 buttons.
lst1 and lst2.  Also has 2 buttons "add" and "Remove".
lst1 is populated from a database table  which has 2 fields : "Name" ad "emailid".
lst1 will show items "name" from table column "name". eg: ronny, danial...
when i select an item(name) in lst1 and click Add button then the name will be added in lst2(lst2 is not connected to datasource). Also the displayvalue member or emailid with respect to the name selected in lst1 will be added to the textbox.(this is working fine).
Now, when i select an item in lst2 which was added from lst1 and then click on Remove button then the item(name) should be removed from lst2(this is also working fine) and also the emailid corresponding to  the value(name) selected in lst2 should be removed from textbox.
emailid on selectitem of lst2 is not getting removes since the lst2 is connected to database. lst is adding its item from lst1.
I hope now the scenario is clear.!:|
Cheers