Exemplo n.º 1
0
        private void UltraTree1InitializeDataNode(object sender, InitializeDataNodeEventArgs e)
        {
            // This event fires every time a node is added to the tree from
            // a data source.

            // Make sure that only the highest-level employees show up at
            // the root level of the tree.
            if (e.Node.Parent == null &&
                GlobalFn.isNullRet(e.Node.Cells["keyParents"].Value, "") != "")
            {
                e.Node.Visible = false;
                return;
            }

            // Put a space before each parent node and color the parent
            // nodes so the the tree is a little easier to read.
            if (e.Node.Nodes.Count > 0)
            {
                // No point in putting a space before the root node.
                if (e.Node.Parent != null)
                {
                    e.Node.Override.NodeSpacingBefore = 0;
                }

                e.Node.Override.NodeAppearance.BackColor         = Color.FromArgb(238, 238, 238);
                e.Node.Override.NodeAppearance.BackColor2        = Color.White;
                e.Node.Override.NodeAppearance.BackGradientStyle = GradientStyle.Vertical;
                e.Node.Override.NodeAppearance.BorderColor       = Color.FromArgb(204, 204, 204);
            }

            // If this is the root node (CEO) then expand it.
            //if (e.Node.Parent == null)
            //    e.Node.Expanded = true;
        }
Exemplo n.º 2
0
 void mUltraTree_InitializeDataNode(object sender, InitializeDataNodeEventArgs e)
 {
     Console.WriteLine("22");
 }