S
Scott McNair
Hi,
I have two listboxes (we'll call them LB1 and LB2). LB1 and LB2 are both
populated from data, with the valuemember bound to the ID, and the
displaymember bound to the data's text.
I would like to be able to move the items back and forth between LB1 and
LB2 by using "<-" and "->" buttons, so databinding is ruled out (since you
can't add or remove items to a bound listbox).
My alternative is to populate LB1 manually, by iterating through the
datarows and adding an item for each row. The problem with this is that I
lose the ability to tie an ID to the valuemember (since a non-databound
listbox is indexed [0,1,2,...] rather than value-bound).
Does anybody have a suggestion as to how I can go about achieving this?
I'm not married to the listbox at this point, and any comparable control
will do.
I have two listboxes (we'll call them LB1 and LB2). LB1 and LB2 are both
populated from data, with the valuemember bound to the ID, and the
displaymember bound to the data's text.
I would like to be able to move the items back and forth between LB1 and
LB2 by using "<-" and "->" buttons, so databinding is ruled out (since you
can't add or remove items to a bound listbox).
My alternative is to populate LB1 manually, by iterating through the
datarows and adding an item for each row. The problem with this is that I
lose the ability to tie an ID to the valuemember (since a non-databound
listbox is indexed [0,1,2,...] rather than value-bound).
Does anybody have a suggestion as to how I can go about achieving this?
I'm not married to the listbox at this point, and any comparable control
will do.