Add value in list box from other list box on button click

V

Vinesh

Hi All,

I need to move items between List Boxes.

Currently I have two listboxes on the form. The left listbox displays
the data from the database.

I am able to retrieve the selected value using
XDocument.DOM.selectSingleNode("//my:List1").text;
Now I want to push this value in the second list box by clicking on one
button & remove any selected value from second list box by clicking on
second button.


I was trying something like this to add selected item in second list
box:

XDocument.DOM.selectSingleNode("//my:List2").text) = XDocument.DOM.
selectSingleNode("//my:List1").text);


But this does not work.
Please help me to resolve this problem

Thanks & Regards,
Vinesh
 
S

S.Y.M. Wong-A-Ton

You need to use appendChild() or removeChild() to add or remove items from
the lists.
 
S

SDecou

Could you post some sample code on how to do this. I have 2 listboxes named
List1 and List2. I've searched in the discussion group and cannot find any
samples using listboxes.
 

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

Top