This is a migrated thread and some comments may be shown as answers.

add client event from button click

3 Answers 28 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Ivy
Top achievements
Rank 1
Ivy asked on 13 Nov 2013, 12:08 PM
Hi

How can I add an item requested event to combobox from client click of a button?

3 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 13 Nov 2013, 12:37 PM
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.
0
Ivy
Top achievements
Rank 1
answered on 13 Nov 2013, 01:35 PM
Thanks.
I was trying with radcombobox.OnClientItemsRequested="OnClientItemsRequested"; but this did work when attached from C# code.
0
Priyanka
Top achievements
Rank 1
answered on 03 Sep 2015, 04:55 AM
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 ?
Tags
ComboBox
Asked by
Ivy
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Ivy
Top achievements
Rank 1
Priyanka
Top achievements
Rank 1
Share this question
or