RadListBox doesn't check multiple item

2 posts, 0 answers
  1. Mohammad Irwan
    Mohammad Irwan avatar
    1 posts
    Member since:
    Aug 2014

    Posted 07 Aug 2014 Link to this post

    I have a saved the multiple checked items into my database, when I retrieve out the records, it only checked one item in the listbox instead of multiple. I have also verified that the records returned in the datatable contains 3 records.

    aspx:
     <telerik:RadListBox ID="lbxDevelopmentComponent" SelectionMode="Multiple" runat="server" OnClientItemChecked="OnClientItemChecked"
                                            CheckBoxes="true" DataTextField="Text" DataValueField="Value" Width="500px" Height="150px">
                                        </telerik:RadListBox>

    .cs:
    var dtDevelopmentComponent = _objSqlManager.ExecuteSQL(sqlDevelopmentComponent.ToString(), paramDevelopmentComponent);

                            if (dtDevelopmentComponent.Rows.Count > 0)
                            {
                                for (int i = 0; i < dtDevelopmentComponent.Rows.Count; i++)
                                {
                                    RadListBoxItem item = lbxDevelopmentComponent.FindItemByText(dtDevelopmentComponent.Rows[0]["DEVELOPMENT_COMPONENT_NAME"].ToString());
                                    if (item != null)
                                        item.Checked = true;
                                }
                            }
  2. Bozhidar
    Admin
    Bozhidar avatar
    1102 posts

    Posted 12 Aug 2014 Link to this post

    Hi,

    I've attached a small sample page, where with the click of a button several items in the ListBox are checked simultaneously, which works fine on my end.

    Regards,
    Bozhidar
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top