Combobox+CheckBox = selected items

2 posts, 0 answers
  1. Yury
    Yury avatar
    1 posts
    Member since:
    Mar 2016

    Posted 07 Mar 2016 Link to this post

    Hello dear friends.
    There are combo box to "Checkbox" feature, how to get the name of the selected items?
    With my 100 Russian rubles for beer)

  2. Eyup
    Eyup avatar
    3322 posts

    Posted 09 Mar 2016 Link to this post

    Hi Yury,

    You can traverse this collection to achieve this requirement:
    foreach (RadComboBoxItem item in RadComboBox1.CheckedItems)
        string text = item.Text;

    If you are using ItemTemplate with checkboxes you can use the following approach:
    Copy Code
    protected void Button1_Click(object sender, EventArgs e)
        IEnumerable checkedItems = RadComboBox1.Items.Where(
            x => (x.FindControl("chk1") as CheckBox).Checked);
        foreach (RadComboBoxItem item in checkedItems)
            string value = item.Value;

    I hope this will prove helpful.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top