Completed
Last Updated: 16 Feb 2017 15:35 by ADMIN
ADMIN
Dimitar
Created on: 31 Jan 2017 09:38
Category: DataFilter
Type: Feature Request
2
ADD. RadDataFilter - add item that has a DropDownListEditor for the value part out of the box.
Add Item that has a DropDownListEditor for the value part.
In addition, the value element should display the value from the DisplayMember.
1 comment
ADMIN
Ralitsa
Posted on: 16 Feb 2017 15:35
Displaying a drop-down list for the value part can be achieved with DataFilterComboDescriptorItem. Please refer to the code snippet below how to implement it: 

//set DataSource
this.radDataFilter2.DataSource = productsBindingSource;

//remove defaulted added DataFilterDescriptorItem
DataFilterDescriptorItem descriptorItem = this.radDataFilter2.Descriptors["CategoryID"] as DataFilterDescriptorItem;
this.radDataFilter2.Descriptors.Remove(descriptorItem);

//add DataFilterComboDescriptorItem 
DataFilterComboDescriptorItem comboDescriptorItem = new DataFilterComboDescriptorItem();
comboDescriptorItem.DataSource = categoriesBindingSource;
comboDescriptorItem.DisplayMember = "CategoryName";
comboDescriptorItem.ValueMember = "CategoryID";
comboDescriptorItem.Name = "CategoryID";
comboDescriptorItem.DescriptorName = "CategoryID";
comboDescriptorItem.DescriptorType = typeof(int);
this.radDataFilter2.Descriptors.Add(comboDescriptorItem);

More information about DataFilterComboDescriptorItem can be found in RadDataFilter`s documentation ( http://docs.telerik.com/devtools/winforms/datafilter/overview ).