Hi there,
I have an issue with selecting an item within a RadComboBox using the client-side method findItemByValue.
The RadComboBox is contained within the ContentTemplate of a RadWindow (in a RadWindowManager), and contains a list of guid / text items, i.e. all content and controls are located in one page.
When the user clicks a "Select Page" RadButton, the window is displayed and what I am trying to get is the currently selected item for the control to be selected when the window opens.
My client-side code is as follows:
(The document.getElementById calls are for hidden fields).
As it stands, the code above does not select the item in the RadComboBox, i.e. item is null. I know there are items in the RadComboBox as call to get_Items() returns 105 objects.
Any suggestions? I'm on a bit of tight deadline on this one :-s
Thank you,
Mike Kingscott
I have an issue with selecting an item within a RadComboBox using the client-side method findItemByValue.
The RadComboBox is contained within the ContentTemplate of a RadWindow (in a RadWindowManager), and contains a list of guid / text items, i.e. all content and controls are located in one page.
When the user clicks a "Select Page" RadButton, the window is displayed and what I am trying to get is the currently selected item for the control to be selected when the window opens.
My client-side code is as follows:
function OpenPageSelectWindow(idControl, textControl, id) {
document.getElementById('<%= uxPageSelectorIDControl.ClientID %>').value = idControl;
document.getElementById('<%= uxPageSelectorTextControl.ClientID %>').value = textControl;
var rwManager = $find("<%= uxRwmAP.ClientID %>");
var radCombo = $find('<%= uxPagesDdl.ClientID %>');
radCombo.trackChanges();
var item = radCombo.findItemByValue(id);
if (item) {
item.select();
}
radCombo.updateClientState();
radCombo.commitChanges()
rwManager.open(null, "uxPageSelector");
return false;
}
(The document.getElementById calls are for hidden fields).
As it stands, the code above does not select the item in the RadComboBox, i.e. item is null. I know there are items in the RadComboBox as call to get_Items() returns 105 objects.
Any suggestions? I'm on a bit of tight deadline on this one :-s
Thank you,
Mike Kingscott