Possible to run webservice when control is focused?

2 posts, 0 answers
  1. Luke Kasper
    Luke Kasper avatar
    18 posts
    Member since:
    Mar 2010

    Posted 13 Dec 2010 Link to this post


    Is there a way to set the combobox to re-run the webservice when the box is focused on, on the client side?  My implementation involves a possibility for a user to have text in the box, go to another control on the page, and then use the Tab key to regain focus on the control.  The problem I'm running into is that when the comboBox receives focus, it's not re-running the webservice.

    Is this even possible?
  2. Kalina
    Kalina avatar
    918 posts

    Posted 17 Dec 2010 Link to this post

    Hello Luke Kasper,

    Let me explain to you how Load On Demand works:
    When the user types in the input area or clicks on the drop-down toggle image if there are no items in the RadComboBox, the Load On Demand will fire a request for items. That is why if the user has already selected an item from the RadComboBox dropdown and then tabs back to the RadComboBox input - a request for items won't be performed.

    However you can try to attach a “keyup” event at RadComboBox input at client-side pageLoad event and fire a request for items within the event handler in this way:

    <script type="text/javascript">
    function pageLoad() {
    var combo = $find("<%=RadComboBox1.ClientID %>");
        $telerik.$(combo.get_inputDomElement()).keyup(function(e) {
            if(e.keyCode == 9) {
                    combo.requestItems("", false);

    All the best,
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Back to Top