Client-side findItemByValue(id) not working with in-page RadWindow?

2 posts, 0 answers
  1. Mike
    Mike avatar
    20 posts
    Member since:
    Jan 2011

    Posted 21 Aug 2011 Link to this post

    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:

    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
  2. Mike
    Mike avatar
    20 posts
    Member since:
    Jan 2011

    Posted 22 Aug 2011 Link to this post

    Nope, it was me being a dumb-ass, hate it when that happens.
Back to Top