FindItemByValue client-side not working

2 posts, 0 answers
  1. Elliott
    Elliott avatar
    392 posts
    Member since:
    May 2010

    Posted 25 Feb 2013 Link to this post

    <telerik:RadComboBox ID="rcbVendor" AutoPostBack="true" ValueType="System.Int32" DataValueField = "VendorNumber" DataTextField = "VendorName" width="280px" runat="server" />
    this snippet doesn't work
    var rntbOrderCode = $find('<%=rntbOrderCode.ClientID %>');        
                if (rcbVendor != null) {
                 rcbiVendor = rcbVendor.findItemByValue(VendorNumber);
                 if (rcbiVendor == null)
                 {
                     alert (VendorNumber);
                 }
                 else
                 {
                     rcbiVendor.select();
                 }
             }
    it finds the combo box - and there is something in VendorNumber
    but it doesn't select

    the routine is on the select of a datagrid - and I have the Ajax manager coded as such
    <telerik:RadAjaxManager ID="raManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rcbVendor">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgItems" />
                    <telerik:AjaxUpdatedControl ControlID="rcbVendor" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rgItems">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgItems" />
                    <telerik:AjaxUpdatedControl ControlID="rcbVendor" />
                    <telerik:AjaxUpdatedControl ControlID="rntbOrderCode" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    it should work, right?
  2. Elliott
    Elliott avatar
    392 posts
    Member since:
    May 2010

    Posted 25 Feb 2013 Link to this post

    um with egg on my face

    it was working - the value being looked up was not actually in the combo box
Back to Top