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

OnClientItemChecked not firing for ItemTemplate

2 Answers 66 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 21 Mar 2014, 07:55 PM
Hi,

Following an update to 2014 Q1 release (base build and the 318 build) I have found that the control below is not firing the OnClientItemChecked event, given that the event seems to work on the demo site I assume that this issue is caused by my use of a checkbox within the ItemTemplate.  This works just fine on earlier 2013 releases.  Anyone know of a work around on this?  

Regards

Jon

                                       
<telerik:RadListBox ID="uxOperativeListBox" runat="server" Height="330" Width="380" OnItemDataBound="uxOperativeListBox_ItemDataBound" OnClientItemChecked="OperativeListBoxClicked">
    <ItemTemplate>
        <div>
            <asp:CheckBox runat="server" ID="uxCheckbox" Checked='false' style="vertical-align:middle;" />
            <asp:Image runat="server" ID="uxOperativeStatus" ImageUrl="~/Images/Icons/16/ok.png" style="vertical-align:middle;" />
            <asp:Label runat="server" ID="uxOperative" AssociatedControlID="uxCheckbox" style="vertical-align:middle;"></asp:Label>
        </div>
    </ItemTemplate>
</telerik:RadListBox>

2 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 24 Mar 2014, 01:27 PM
Hi Jon,

By default the OnClientItemChecked event should be thrown only when the default Checkbox of RadListbox is checked and in cases when itemTemplate is used as in your case it should not be fired. You can still make it work if you add the rlbCheck Cssclass as in the code belwo:
<asp:CheckBox runat="server" CssClass="rlbCheck" ID="uxCheckbox" Checked='false' style="vertical-align:middle;" />

Please have in mind that basically in such cases we kindly recommend using the default checkbox functionality of RadListbox as for example in this on-line demo instead of using templates because this is the scenarios against we are building and testing the control.

Regards,
Plamen
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Jon
Top achievements
Rank 1
answered on 24 Mar 2014, 01:35 PM
Hi Plamen,

It's odd as it did work before the update.

Anyway I've sorted with a client click update...

Regards

Jon
Tags
ListBox
Asked by
Jon
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Jon
Top achievements
Rank 1
Share this question
or