Add entries to distinct filter list programmatically

2 posts, 0 answers
  1. Luzius
    Luzius avatar
    14 posts
    Member since:
    Jun 2010

    Posted 25 Jan 2011 Link to this post

    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
  2. Luzius
    Luzius avatar
    14 posts
    Member since:
    Jun 2010

    Posted 25 Jan 2011 Link to this post

    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;
    }

  3. DevCraft banner
Back to Top