This is working fine as long as I am not passing any parameter in the function.
var tree = $find('RadComboBox1_i0_RadTreeView1');
var comboBox = $find('RadComboBox1');
var nodes = tree.get_checkedNodes();
var strText = 'you have selected ' + nodes.length + ' nodes';
As we are adding all controls at runtime and we are not sure how many controls will be added, we need to pass the Combobox and treeview as parameter.
What is the way of passing these parameters in this function?