コード例 #1
0
ファイル: DxTreeList.cs プロジェクト: babann/HOPE
        /// <summary>
        /// Adds a column to the DevExpress tree control.  Various properties of the column are defined in our class DxTreeListColumn
        /// which is used by the MyXaml deserializer for easier use in the XML.
        /// </summary>
        /// <param name="col"></param>
        protected void AddColumn(DxTreeListColumn col)
        {
            TreeListColumn tlc = Columns.Add();

            tlc.Caption = col.Caption;
            tlc.OptionsColumn.AllowEdit = col.AllowEdit;
            tlc.Visible = col.Visible;

            if (col.Visible)
            {
                tlc.VisibleIndex = 0;
            }
        }
コード例 #2
0
ファイル: DxTreeList.cs プロジェクト: babann/HOPE
        public List <DxTreeListColumn> GetTreeColumns()
        {
            List <DxTreeListColumn> cols = new List <DxTreeListColumn>();

            foreach (TreeListColumn tlc in Columns)
            {
                DxTreeListColumn col = new DxTreeListColumn()
                {
                    Caption      = tlc.Caption,
                    Visible      = tlc.Visible,
                    VisibleIndex = tlc.VisibleIndex,
                    Width        = tlc.Width,
                    SortIndex    = tlc.SortIndex,
                    SortOrder    = tlc.SortOrder,
                };

                cols.Add(col);
            }

            return(cols);
        }
コード例 #3
0
ファイル: DxTreeList.cs プロジェクト: keithshort/HOPE
		/// <summary>
		/// Adds a column to the DevExpress tree control.  Various properties of the column are defined in our class DxTreeListColumn
		/// which is used by the MyXaml deserializer for easier use in the XML.
		/// </summary>
		/// <param name="col"></param>
		protected void AddColumn(DxTreeListColumn col)
		{
			TreeListColumn tlc = Columns.Add();
			tlc.Caption = col.Caption;
			tlc.OptionsColumn.AllowEdit = col.AllowEdit;
			tlc.Visible = col.Visible;

			if (col.Visible)
			{
				tlc.VisibleIndex = 0;
			}
		}
コード例 #4
0
ファイル: DxTreeList.cs プロジェクト: keithshort/HOPE
		public List<DxTreeListColumn> GetTreeColumns()
		{
			List<DxTreeListColumn> cols = new List<DxTreeListColumn>();

			foreach (TreeListColumn tlc in Columns)
			{
				DxTreeListColumn col = new DxTreeListColumn()
				{
					Caption = tlc.Caption,
					Visible = tlc.Visible,
					VisibleIndex = tlc.VisibleIndex,
					Width = tlc.Width,
					SortIndex = tlc.SortIndex,
					SortOrder = tlc.SortOrder,
				};

				cols.Add(col);
			}

			return cols;
		}