This is a migrated thread and some comments may be shown as answers.

FindItemByValue client-side not working

1 Answer 205 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Elliott
Top achievements
Rank 2
Elliott asked on 25 Feb 2013, 04:32 PM
<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?

1 Answer, 1 is accepted

Sort by
0
Elliott
Top achievements
Rank 2
answered on 25 Feb 2013, 06:06 PM
um with egg on my face

it was working - the value being looked up was not actually in the combo box
Tags
ComboBox
Asked by
Elliott
Top achievements
Rank 2
Answers by
Elliott
Top achievements
Rank 2
Share this question
or