Data Binding
RadDataFilter will read the properties of its DataSource and will automatically create the corresponding descriptor items for each of them. It accepts DataTable, DataSet and BindingSource.
Design Time
You can set the DataSource property either via the Smart Tag or by the Properties section in Visual Studio.
After specifying the DataSource property, the Descriptors collection will be automatically populated with descriptor items considering the available fields in the source object.
Then, if you open the RadDataFilter Design Time Editor, you can select the desired items in order to build a filter expression.
Run Time
It is possible to set the DataSource property programmatically as well.
Setting DataSource at run time
DataTable dt = new DataTable();
dt.Columns.Add("Id", typeof(int));
dt.Columns.Add("Name", typeof(string));
dt.Columns.Add("IsActive", typeof(bool));
this.radDataFilter1.DataSource = dt;
Dim dt As New DataTable()
dt.Columns.Add("Id", GetType(Integer))
dt.Columns.Add("Name", GetType(String))
dt.Columns.Add("IsActive", GetType(Boolean))
Me.RadDataFilter1.DataSource = dt
After setting the DataSource property, the Descriptors collection is filled with the respective fields. Then, you can apply the desired filter either by setting the Expression property or by using the UI at run time.