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

Add entries to distinct filter list programmatically

1 Answer 46 Views
TreeListView
This is a migrated thread and some comments may be shown as answers.
Luzius
Top achievements
Rank 1
Luzius asked on 25 Jan 2011, 11:19 AM
Hi,

Since only the values at the highest level of the hierarchy in a RadTreeListView are automatically included in the distinct filter list, I wanted to ask if it is possible to programmatically add additional entries, to be displayed in the filter dialog, to the distinct filter list.

Thanks,
Luzius

1 Answer, 1 is accepted

Sort by
0
Luzius
Top achievements
Rank 1
answered on 25 Jan 2011, 01:57 PM
I just found out how it works. The RadTreeListView fires a DistinctValueLoading event. There you can set a list of the requested values as ItemsSource.

private void tlvSwInv_DistinctValuesLoading(object sender, GridViewDistinctValuesLoadingEventArgs e)
{
    List<string> _distinctFilters = new List<string>();
    _distinctFilters.Add("English (United States) [1033]");
    _distinctFilters.Add("German (Switzerland) [2055]");
    e.ItemsSource = _distinctFilters;
}

Tags
TreeListView
Asked by
Luzius
Top achievements
Rank 1
Answers by
Luzius
Top achievements
Rank 1
Share this question
or