This is a migrated thread and some comments may be shown as answers.

RadListBox doesn't check multiple item

1 Answer 20 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Mohammad Irwan
Top achievements
Rank 1
Mohammad Irwan asked on 07 Aug 2014, 08:12 AM
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;
                            }
                        }

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 12 Aug 2014, 07:57 AM
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.

 
Tags
ListBox
Asked by
Mohammad Irwan
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or