RadCheckedDropDownList selected items not being stored to dataset

1 Answer 18 Views
CheckedDropDownList
Czeshirecat
Top achievements
Rank 2
Iron
Iron
Czeshirecat asked on 13 Mar 2024, 11:27 AM

I have a list of people in a datatable that I bind to a RadCheckedDropDown list via a bindingsource. This control is sited on the first page of a tab control. It's a list that provides the app user with a definable selection of staff members for a report.
On initialization of the form, only one item is selected, but as a test I check all items in the dropdown then move to the 2nd page of the tab control. If I then return to the first tab, the checkeddropdown list has returned to displaying only the initial single checked item .

I placed a breakpoint in my code and the dataset hasn't changed, ie the "Include" field still remains set to false for all rows except that initial row. ie checking items in the list aren't being reflected in the dataset. See untitled2.png

Have I failed to do something ?


      // 
      // CmbStaffFilter
      // 
      this.CmbStaffFilter.CheckedMember = "Include";
      this.CmbStaffFilter.DataSource = this.bsStaffFilter;
      this.CmbStaffFilter.DisplayMember = "Fullname";
      this.CmbStaffFilter.ItemHeight = 32;
      this.CmbStaffFilter.Location = new System.Drawing.Point(29, 35);
      this.CmbStaffFilter.Name = "CmbStaffFilter";
      this.CmbStaffFilter.ShowCheckAllItems = true;
      this.CmbStaffFilter.Size = new System.Drawing.Size(444, 20);
      this.CmbStaffFilter.TabIndex = 121;
      this.CmbStaffFilter.ValueMember = "RecId";

      // 
      // bsStaffFilter
      // 
      this.bsStaffFilter.DataSource = typeof(pulse.move.datasources.dsFilterStaff.dtFilterStaffDataTable);

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 14 Mar 2024, 02:56 PM

Hello,

To update the data source accordingly it should be notified about the changes you have made into the RadCheckedDropDown. I am not sure what is the exact setup on your end, this is why I would like to ask does your custom object implements the INotifyPropertyChanged interface. The following article might be useful on this topic: Data Binding - RadCheckedDropDownList - Telerik UI for WinForms 

You can also check the following threads where similar questions were discussed:
c# - CheckedListBox binding update DataSource - Stack Overflow 
c# - How to refresh DataSource of a ListBox - Stack Overflow

I hope this information is useful. Should you have any other questions please let me know. 

Regards,
Nadya | Tech Support Engineer
Progress Telerik

A brand new ThemeBuilder course was just added to the Virtual Classroom. The training course was designed to help you get started with ThemeBuilder for styling Telerik and Kendo UI components for your applications. You can check it out at https://learn.telerik.com
Tags
CheckedDropDownList
Asked by
Czeshirecat
Top achievements
Rank 2
Iron
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or