Hi I am trying to hook up an ajax event every time a checkbox is clicked inside of a dynamically populated radcombobox itemtemplate that contains a label and checkbox. I get the ajax to work on the first checkbox that is clicked and it refreshes the grid using ajax but once you click a second item it causes a postback. What is the best way to accomplish this?
| Protected Sub chk1_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs) |
| rgReceived.Rebind() |
| End Sub |
| Protected Sub rcbBehavior_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles rcbBehavior.ItemDataBound |
| Dim chkBox As CheckBox = e.Item.FindControl("chk1") |
| RadAjaxManager1.AjaxSettings.AddAjaxSetting(chkBox, rgReceived, RadAjaxLoadingPanel1) |
| End Sub |
| <telerik:RadComboBox ID="rcbBehavior" |
| runat="server" AllowCustomText="true" ZIndex="3" |
| OnClientDropDownOpening="OnClientDropDownOpenedHandler" EmptyMessage="Select Behaviors..." |
| HighlightTemplatedItems="true" Width="240px"> |
| <ItemTemplate> |
| <div> |
| <asp:CheckBox ID="chk1" runat="server" Checked="true" AutoPostBack="true" onclick="onCheckBoxClick(this);" |
| OnCheckedChanged="chk1_CheckedChanged" /> |
| <asp:Label ID="Label1" runat="server" AssociatedControlID="chk1"> |
| <%#Eval("Title")%> |
| </asp:Label> |
| </div> |
| </ItemTemplate> |
| </telerik:RadComboBox> |