Set focus on RadComboBox but still display EmptyMessage

4 posts, 0 answers
  1. J
    J avatar
    2 posts
    Member since:
    Jun 2013

    Posted 03 Jun 2013 Link to this post

    Hello,

    On page load I want to give a RadComboBox focus but still display the emptymessage. When I start typing, I want the emptymessage to disappear. Is this possible?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 03 Jun 2013 Link to this post

    Hi J,

    Please try the following JavaScript to set focus on the RadComboBox on page load and the EmptyMessage wont get displayed. To know more about focusing the RadComboBox, please visit this documentation.

    JavaScript:
    <script type="text/javascript">
        function pageLoad() {
            var RadComboBox1 = $find('<%=RadComboBox1.ClientID %>');
            var input = RadComboBox1.get_inputDomElement().focus();
        }
    </script>

    Thanks,
    Shinu
  3. J
    J avatar
    2 posts
    Member since:
    Jun 2013

    Posted 04 Jun 2013 Link to this post

    But I want the combobox to have focus and the emptymessage to be displayed.
  4. Nencho
    Admin
    Nencho avatar
    1812 posts

    Posted 06 Jun 2013 Link to this post

    Hello,

    This scenario is not supported, since the functionality of the EmptyMessage in the RadComboBox is that it should disappear, once the control is focused, regardless if the user is allowed to type in the input of the control or not.

    Regards,
    Nencho
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Back to Top