OnClientItemChecked event is not firing

2 posts, 0 answers
  1. Punit
    Punit avatar
    1 posts
    Member since:
    Sep 2014

    Posted 05 Sep 2014 Link to this post

    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
  2. Aneliya Petkova
    Admin
    Aneliya Petkova avatar
    207 posts

    Posted 09 Sep 2014 Link to this post

    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.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top