0

I am using telerik:RadAutoCompleteBox as a input element.I want to set its value from javascript on the click event of the another button.The code for the element is as follows:

<telerik:RadAutoCompleteBox
         runat="server"
         ID="costCodeTxt"
         Width="400"
         OnClientRequesting="requesting"
         DropDownWidth="300"
         InputType="Text"
         TextSettings-SelectionMode="Single"
         OnClientTextChanged="VerifyJobCostCode">
               <WebServiceSettings Path="~/QuantitySurvey/CostCode.asmx" Method="GetCostCodeList" />
</telerik:RadAutoCompleteBox>

1 Answer 1

1

This should work to get you to the dom element, allowing you to set the value.

function setText(text){
    var domElement = $find("<%= costCodeTxt.ClientID %>").get_inputElement();
    domElement.value = text;
}

You probably also want to set this to allow custom text

AllowCustomEntry = "true"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.