Exemplo n.º 1
0
        /// <summary>
        /// Adds the items of a has many collection to the tree view.
        /// </summary>
        protected virtual void AddHasManyNodes() {
            Collection.CollectionList.Sort((a, b) => String.Compare((a as IEditableDbRecord).Name, (b as IEditableDbRecord).Name));

            foreach (IEditableDbRecord record in Collection.CollectionList) {
                var node = new RecordTreeNode(record);
                Nodes.Add(node);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Adds all root records to the tree view.
        /// </summary>
        protected virtual void AddRecordsToTreeView() {

            if (rootRecords == null)
                return;

            foreach (IEditableDbRecord record in rootRecords) {
                var node = new RecordTreeNode(record);
                Tree.Nodes.Add(node);
            }

        }