How to set Focus on a "RadTextBox" after listbox.get_selectedItem().set_selected(false)

2 posts, 0 answers
  1. Jita
    Jita avatar
    8 posts
    Member since:
    Sep 2014

    Posted 22 Jan 2016 Link to this post

    I have a pannel control, where I want a specific textbox to be selected after the listbox.get_selectedItem(). but in the javascript side if I put #RadTextboxID.focus() it never comes down there and the RadTB is not selected.

    MY code in the JS side

    function AddNewTask() {
        var listbox = $find('rlbTasks');
        $('#lblEditTaskSign').html('Add Task/Milestone');
      $( "#rtbName" ).focus();


    And the page does not post back so setting it in the page_load did not help. 


    I also tried :

     <telerik:RadTextBox ClientEvents-OnLoad="onClientLoad" runat="server" ID="rtbName" MaxLength="255" />                                                    

    function onClientLoad(sender) // executes when loading the RadTextBox 


    Did not work? how should I approach this issue?

  2. Eyup
    Eyup avatar
    3644 posts

    Posted 27 Jan 2016 Link to this post

    Hi Jita,

    Try the following approach:
    function buttonClick() {
        var textBox = $find('<%= rtbName.ClientID %>');

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top