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

OnClientItemChecked event is not firing

1 Answer 171 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Punit
Top achievements
Rank 1
Punit asked on 05 Sep 2014, 10:10 AM
Hi,

We are using Radio Combobox with multi select checkbox. I need to fire a client side event on checbkox click and henceforth I would like to use OnClientItemChecked. But this event is not firing. If my page is under updatepanel then could it create an issue.

Here is my below code-

<script language="javascript" type="text/javascript">
        function OnClientItemChecked(sender, eventArgs) {
            var item = eventArgs.get_item();          
        }
</script>

<telerik:RadComboBox ID="ddlClient" runat="server" Width="172px"  AllowCustomText="True" OnClientDropDownClosed="onDropDownClosing" OnClientItemChecked="OnClientItemChecked"
                        HighlightTemplatedItems="true" Height="200px" EmptyMessage="Select Clients" Enabled="false" OnItemDataBound="ddlClient_ItemDataBound" CheckBoxes="True" EnableCheckAllItemsCheckBox ="true">
                        <Localization CheckAllString="Select All" />
                    </telerik:RadComboBox>

Thanks,
Punit Singhi

1 Answer, 1 is accepted

Sort by
0
Aneliya Petkova
Telerik team
answered on 09 Sep 2014, 10:18 AM
Hi,

I inspected your markup and made a simple page for testing, but I was not able to reproduce such an issue. I tested with both asp:UpdatePanel and RadAjaxPanel, but everything works fine at my end and the OnClientItemChecked event is fired. Bellow you can find the markup I used for testing:
<form id="form1" runat="server">
    <asp:ScriptManager runat="server" />
    <div>
        <script type="text/javascript">
            function OnClientItemChecked(sender, eventArgs) {
                var item = eventArgs.get_item();
                alert("Checked");
            }
        </script>
        <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="ddlClient" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
            <telerik:RadComboBox ID="ddlClient" runat="server" Width="172px" AllowCustomText="True" _OnClientDropDownClosed="onDropDownClosing" OnClientItemChecked="OnClientItemChecked"
                HighlightTemplatedItems="true" Height="200px" EmptyMessage="Select Clients" Enabled="true" _OnItemDataBound="ddlClient_ItemDataBound" CheckBoxes="True" EnableCheckAllItemsCheckBox="true">
                <Localization CheckAllString="Select All" />
                <Items>
                    <telerik:RadComboBoxItem Text="Arts" />
 
                    <telerik:RadComboBoxItem Text="Biographies" />
 
                    <telerik:RadComboBoxItem Text="Children's Books" />
 
                    <telerik:RadComboBoxItem Text="Computers & Internet" />
 
                    <telerik:RadComboBoxItem Text="Cooking" />
 
                    <telerik:RadComboBoxItem Text="History" />
 
                    <telerik:RadComboBoxItem Text="Fiction" />
 
                    <telerik:RadComboBoxItem Text="Mystery" />
 
                    <telerik:RadComboBoxItem Text="Nonfiction" />
 
                    <telerik:RadComboBoxItem Text="Romance" />
 
                    <telerik:RadComboBoxItem Text="Science Fiction" />
 
                    <telerik:RadComboBoxItem Text="Travel" />
                </Items>
            </telerik:RadComboBox>
        </telerik:RadAjaxPanel>
    </div>
</form>

Also you may see this video showing the result of my test.
Please try my code and let me know how it goes.

Regards,
Aneliya Petkova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ComboBox
Asked by
Punit
Top achievements
Rank 1
Answers by
Aneliya Petkova
Telerik team
Share this question
or