예제 #1
0
        private void InitModel()
        {
            // Create the model
            model = new TreeGridModel();

            // Add a bunch of items at the root
            for (int count = 0; count < Roots; count++)
            {
                // Create the root item
                Item root = new Item(String.Format("Root {0}", count), value++, true);

                // Add children to the root
                AddChildren(root);

                // Add the root to the model
                model.Add(root);
            }
        }
예제 #2
0
        /// <summary>
        /// 初始化模型
        /// </summary>
        private void InitModel()
        {
            // Create the model
            model = new TreeGridModel();

            // Add a bunch of items at the root
            for (int count = 0; count < Roots; count++)
            {
                // Create the root item
                int  num  = value++;
                Item root = new Item($"Root {count}", num, $"这是备注字段{num}", true);

                // Add children to the root
                AddChildren(root);

                // Add the root to the model
                model.Add(root);
            }
        }