Exemple #1
0
        private void TreeListView_OnCustomNodeFilter(object sender, TreeListNodeFilterEventArgs e)
        {
            if (_inCollapsingOrExpanding)
            {
                return;
            }

            var tree = sender as CustomTreeListView;

            if (tree == null || tree.AutoExpandAllNodes)
            {
                return;
            }

            if (!string.IsNullOrEmpty(tree.SearchString))
            {
                e.Node.IsExpanded = true;
            }
            else
            {
                foreach (var node in tree.Nodes)
                {
                    node.IsExpanded = false;
                }
            }
        }
 void OnTreeListCustomNodeFilter(object sender, TreeListNodeFilterEventArgs e)
 {
     if (CollectionView.Filter == null || FilterMode == ModelFilterMode.FilterCriteria)
     {
         return;
     }
     e.Visible = CollectionView.Filter(e.Node.Content);
     e.Handled = true;
 }
Exemple #3
0
        private void OnCustomNodeFilter(object sender, TreeListNodeFilterEventArgs e)
        {
            if (_inCollapsingOrExpanding)
            {
                return;
            }

            foreach (var item in e.Node.Nodes.Where(item => item.IsFiltered == false))
            {
                e.Visible = true;
                e.Handled = true;
            }
        }
Exemple #4
0
        private void OnCustomNodeFilter(object sender, TreeListNodeFilterEventArgs e)
        {
            var filter = ((TreeListView)sender).DataControl.FilterCriteria;

            if (filter == null)
            {
                return;
            }
            if (IsNodeVisible(e.Node, filter) || IsChildNodeVisible(e.Node, filter))
            {
                MakeNodeVisible(e.Node);
                e.Visible = true;
            }
            else
            {
                e.Visible = false;
            }
            e.Handled = true;
        }