Hello,
I have a RadComboBox and have created a Checkbox column via an ItemTemplate. The RadComboBox is bound dynamically in the code behind.
Is there an easy way to insert a default record for the RadComboBox on databind, then once that first default record is selected by the user, the rest of the checkboxes in the RadComboBox are selected (acting as a "select all" checkbox)?
Here's my ASPX Code:
Here's id my VB Code:
Thanks!
Jason
I have a RadComboBox and have created a Checkbox column via an ItemTemplate. The RadComboBox is bound dynamically in the code behind.
Is there an easy way to insert a default record for the RadComboBox on databind, then once that first default record is selected by the user, the rest of the checkboxes in the RadComboBox are selected (acting as a "select all" checkbox)?
Here's my ASPX Code:
<telerik:RadComboBox ID="ddlProjects" EnableScreenBoundaryDetection="False" EmptyMessage="Select Project(s)" runat="server"> |
<ItemTemplate> |
<asp:CheckBox runat="server" ID="CheckBox" Text="" /> <%#DataBinder.Eval(Container, "Text")%> |
</ItemTemplate> |
</telerik:RadComboBox> |
Here's id my VB Code:
Protected Sub ddlProjects_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlProjects.Load |
Try |
If Not Page.IsPostBack Then |
ddlProjects.DataSource = l_oUniversal.PopulateDropDownList("sprocSchedule_Get_ProjectNames") |
ddlProjects.DataValueField = "ProjectID" |
ddlProjects.DataTextField = "ProjectName" |
ddlProjects.DataBind() |
ddlProjects.Items.Insert(0, New RadComboBoxItem("")) |
End If |
Catch ex As Exception |
' Log Error |
End Try |
End Sub |
Thanks!
Jason