Is it doable?
i have a radlistboxitem list on which i would like to add label for, so that we will be able to select the checkbox using the label not the checkbox.
So far, i have this code, but it is not working. Your help will be greatly appreciated.
aspx
<telerik:RadListBox runat="server" ID="testRadlist" AutoPostBack="true" RenderMode="Lightweight" CheckBoxes="true" SelectionMode="Multiple" Width="215PX"><ItemTemplate> <asp:Label runat="server" Text="Text" ID="lblRadlist" AssociatedControlID=""></asp:Label></ItemTemplate><Items> </Items>
aspx.cs
testRadlist.Items.Clear(); testRadlist.Items.Add(new RadListBoxItem { Value = "Summary", // Text = "Summary" }); testRadlist.Items.Add(new RadListBoxItem { Value = "Edit", //Text = "Edit" }); for (int i=0; i < testRadlist.Items.Count; i++) { testRadlist.Items[i].DataBind(); Label lbl = (Label)testRadlist.Items[i].FindControl("lblRadlist"); string val = lbl.Text; } }