Declined
Last Updated: 04 Oct 2016 05:08 by ADMIN
CMS HS
Created on: 20 Sep 2016 12:21
Category: ListView, CardView and CheckedListBox
Type: Bug Report
0
IndexOutofRangeException
I got an exception when I'll try to add new items in a radcheckeddropdownlist.
No differences between AddRange(List<objects>) and Add(<object>)

We use the dropdownlist in the CustomAppointmentEditDialog for resources and here some sample code:
                //cmbResourceMulti.BeginUpdate();
        
                cmbResourceMulti.Items.Clear();
                var resources = data.GetRooms();

                List<RadCheckedListDataItem> lst = new List<RadCheckedListDataItem>();

                foreach (var res in resources)
                {
                    var item = new RadCheckedListDataItem(res.Raumname);
                    item.Tag = res;
                    item.Value = res.ID;
                    lst.Add(item);

                    if (sourceEvent.ResourceId != null && sourceEvent.ResourceIds.Contains(new EventId(res.ID)))
                    {
                        item.Checked = true;
                    }
                }
                
                cmbResourceMulti.Items.AddRange(lst.ToArray());
                //cmbResourceMulti.EndUpdate();
                cmbResourceMulti.Refresh();

On first load everything is working fine. Open an existing appointment and check a new resource. After saving the appointment and reopen it, the error appears .
See attached file.

Can you help please?
 
Attached Files:
2 comments
ADMIN
Stefan
Posted on: 04 Oct 2016 05:08
This item is declined due to insufficient information. Feel free to post back here when convenient, and once we have it reproduced, we will open the case again.
ADMIN
Dess | Tech Support Engineer, Sr.
Posted on: 26 Sep 2016 11:49
Hello Michael ,
Thank you for writing. However, I was unable to replicate any error when adding a RadCheckedListDataItem or a range of items to the RadCheckedDropDownList.Items collection. I would kindly ask you to submit a support ticket with the relevant controls' version and provide a simple solution demonstrating the problem. This would be the fastest way to investigate the precise case and assit you further. Thank you in advance.