Well I managed to figure out a solution myself so I thought I'd share it. The problem with using a dropdown with the example had to do with what happened to the secondary datasources after the initial selection. Basically nodes were being moved and not replaced. So to fix the problem I modified the following:
1.) Changed this line from:
IXMLDOMNode fileQueryNode = thisXDocument.GetDOM("GetListItemsConfig").selectSingleNode("/GetListItemsConfig/QueryXmlString/Query ");
to:
IXMLDOMDocument document = thisXDocument.CreateDOM();
document.preserveWhiteSpace = true;
document.loadXML(thisXDocument.GetDOM("GetListItemsConfig").selectSingleNode("/GetListItemsConfig/QueryXmlString/Query ").xml);
IXMLDOMNode fileQueryNode = document.documentElement;
2.) Changed this line from:
oQuery.appendChild(fileQueryNode);
to:
if( oQuery.firstChild != null )
oQuery.replaceChild(fileQueryNode,oQuery.firstChild);
else
oQuery.appendChild(fileQueryNode);
This first part created a new instance of the node so it was not removed on the second selection of the dropdown. The second part added a check to make sure you are not appending multiple query nodes when the second selection occurs.
Thanks.