add client event from button click

4 posts, 1 answers
  1. Ivy
    Ivy avatar
    30 posts
    Member since:
    Feb 2013

    Posted 13 Nov 2013 Link to this post

    Hi

    How can I add an item requested event to combobox from client click of a button?
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Nov 2013 Link to this post

    Hi Ivy,

    Please have a look into the following JavaScript code I tried to attach the ItemsRequested event of the RadComboBox on client click of a RadButton.

    JavaScript:
    <script type="text/javascript">
        function OnClientClicked(sender, args) {
            var radcombobox = $find('<%=RadComboBox1.ClientID %>');
            radcombobox.add_itemsRequested(OnClientItemsRequested);
        }
        function OnClientItemsRequested(sender, args) {
            //Your Code
        }
    </script>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Ivy
    Ivy avatar
    30 posts
    Member since:
    Feb 2013

    Posted 13 Nov 2013 Link to this post

    Thanks.
    I was trying with radcombobox.OnClientItemsRequested="OnClientItemsRequested"; but this did work when attached from C# code.
  5. Priyanka
    Priyanka avatar
    34 posts
    Member since:
    Dec 2014

    Posted 02 Sep 2015 Link to this post

    Hi there is a RadComboBox inside EditItemTemplate of RadGrid along with a Button.

    I am using _ItemsRequested event just to do the search in RadComboBox but not loading the whole list into it on click of RadComboBox. 

    Current functionality is:
    When user click on textarea of RadComboBox, type/key-in any thing,  then only the Combo binds the searched related Items into it.

    Now I want to get below functionality on button click:
    when user click on textarea of RadComboBox, type/key-in any thing, and click on button..then only the Combo shall bind the searched related Items into it.

    Please someone reply how to achieve it ?
Back to Top