RadComboBox Checkbox problem

6 posts, 0 answers
  1. S L
    S L avatar
    6 posts
    Member since:
    Jul 2013

    Posted 28 Nov 2013 Link to this post

    Why there was any error saying "CheckedItems is not a member of Telerik.WebControls.RadComboBox" ?
    Why there was an error saying "Checked is not a member of Telerik.WebControls.RadComboBoxItem" ?

                Dim collection As IList(Of RadComboBoxItem) = rcb.CheckedItems
                Dim intCheck As Integer = collection.Count

                For Each itm As RadComboBoxItem In collection
                    If itm.Value = drName(strColumn) And Not (drName(strColumn) Is DBNull.Value) Then
                        itm.Checked = True
                        Exit For
                    End If
                Next

    my development tools were VS2010 using IIS 6.5 ASP 2.0
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Nov 2013 Link to this post

    Hi S L,

    Unfortunately I couldn't replicate the issue at my end. Please have a look into sample code to which works as expected.

    ASPX:
    <telerik:RadComboBox ID="RadComboBox1" CheckBoxes="true" runat="server">
        <Items>
            <telerik:RadComboBoxItem Text="Item1" runat="server" Value="1" />
            <telerik:RadComboBoxItem Text="Item2" runat="server" Value="1" />
            <telerik:RadComboBoxItem Text="Item3" runat="server" Value="1" />
            <telerik:RadComboBoxItem Text="Item4" runat="server" Value="1" />
            <telerik:RadComboBoxItem Text="Item5" runat="server" Value="2" />
            <telerik:RadComboBoxItem Text="Item6" runat="server" Value="2" />
            <telerik:RadComboBoxItem Text="Item7" runat="server" Value="2" />
            <telerik:RadComboBoxItem Text="Item8" runat="server" Value="2" />
        </Items>
    </telerik:RadComboBox>
    <telerik:RadButton ID="RadButton1" runat="server" Text="Get CheckedItems" OnClick="RadButton1_Click">
    </telerik:RadButton>

    C#:
    Protected Sub RadButton1_Click(sender As Object, e As EventArgs)
        Dim collection As IList(Of RadComboBoxItem) = RadComboBox1.CheckedItems
        Dim intCheck As Integer = collection.Count
        For Each itm As RadComboBoxItem In collection
            If itm.Value = "1" Then
                itm.Checked = True
            Else
                itm.Checked = False
            End If
        Next
    End Sub

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. S L
    S L avatar
    6 posts
    Member since:
    Jul 2013

    Posted 28 Nov 2013 Link to this post

    i try ur code and i still have error on codes.
    RadComboBox1.CheckedItems, saying CheckedItems is not a member of RadComboBox
    itm.Checked = False, saying Checked is not a member of RadComboBoxItem

    i am using Telerik 2002-2011, Telerik.Web.UI.dll, version 2011.1.413.35.
    i am wondering does this version not having checkbox in radcombobox.
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 28 Nov 2013 Link to this post

    Hi S L,

    RadComboBox introduces CheckBox support in Q2,2011 version. Please upgrade your telerik version to solve the issue.

    Thanks,
    Princy.
  6. S L
    S L avatar
    6 posts
    Member since:
    Jul 2013

    Posted 28 Nov 2013 Link to this post

    Thanks. Can I know where I can download this Q2,2011 version setup?
  7. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 29 Nov 2013 Link to this post

    Hi S L,

    Please have a look into this documentation to update the version.

    Thanks,
    Shinu.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017