Skip to Content
0
Former Member
Oct 24, 2006 at 12:23 AM

Context Problem (Two ItemListBoxes with Multi Selection)

99 Views

People, I really could use some help over here, thanks in advance.

I have two itemlistboxes (which can be multi selected) and need, in an action, to put the selected items of one into the other.

One is bound to a model node which results come from a RFC connection, and this is working well.

The other one is bound to a model node with the same type of the first one, and I want to put elements dinamically in it.

I´m using the following code:

  for ( int j = 0, n = wdContext.myNode().size(); j < n; j++ )
{
 if (wdContext.Mynode().isMultiSelected(j))
{
IWDNodeElement element = wdContext.Mynode().getElementAt(j);
		   wdContext.Mynode().removeElement(element);
		   wdContext.nodeGrpItems().addElement(element);
}
}

With this code (and with many others I tried), I get a conversion error (or a "incompatible nodes" message, when I try to use WDCopyService).

I´m really, really stuck here... So, if anyone can tell me what I´m doing wrong OR explain me another way to do what I want, I´ll be very thankful.