예제 #1
0
        public override IVirtualizedElement <RadTreeNode> CreateElement(
            RadTreeNode data,
            object context)
        {
            CreateTreeNodeElementEventArgs e = new CreateTreeNodeElementEventArgs(data);

            this.TreeViewElement.OnCreateNodeElement(e);
            if (e.NodeElement != null)
            {
                return((IVirtualizedElement <RadTreeNode>)e.NodeElement);
            }
            if (data is DataFilterGroupNode)
            {
                return((IVirtualizedElement <RadTreeNode>) new DataFilterGroupElement());
            }
            if (data is DataFilterCriteriaNode)
            {
                DataFilterCriteriaNode filterCriteriaNode = data as DataFilterCriteriaNode;
                if ((object)filterCriteriaNode.ValueType == (object)typeof(bool))
                {
                    return((IVirtualizedElement <RadTreeNode>) new DataFilterCheckboxCriteriaElement());
                }
                if ((object)filterCriteriaNode.ValueType == (object)typeof(Color))
                {
                    return((IVirtualizedElement <RadTreeNode>) new DataFilterColorboxCriteriaElement());
                }
                return((IVirtualizedElement <RadTreeNode>) new DataFilterCriteriaElement());
            }
            if (data is DataFilterAddNode)
            {
                return((IVirtualizedElement <RadTreeNode>) new DataFilterAddNodeElement());
            }
            return(base.CreateElement(data, context));
        }
예제 #2
0
        public override IVirtualizedElement <RadTreeNode> CreateElement(
            RadTreeNode data,
            object context)
        {
            CreateTreeNodeElementEventArgs e = new CreateTreeNodeElementEventArgs(data);

            this.treeViewElement.OnCreateNodeElement(e);
            if (e.NodeElement != null)
            {
                return((IVirtualizedElement <RadTreeNode>)e.NodeElement);
            }
            return(base.CreateElement(data, context));
        }
예제 #3
0
 void TreeViewElement_CreateNodeElement(object sender, Telerik.WinControls.UI.CreateTreeNodeElementEventArgs e)
 {
     e.NodeElement = new CustomTreeNodeElement();
 }