DevExpress XtraGrid 添加列Column

   引用

using DevExpress.XtraGrid.Columns;
using DevExpress.XtraEditors.Repository;        

 

           GridColumn column = view.Columns.AddVisible("");
            
            column.Caption = "显示";
            column.Name = "名称";
            double f = 10.6;
            f++;
            RepositoryItemTextEdit colCombo = new RepositoryItemTextEdit();

            colCombo.NullText = f.ToString() ;
            column.ColumnEdit = colCombo;

 

最重要的view.Columns.AddVisible,如果先创建Column然后view再add是不显示的。道理可能和datatable newrow()一样吧。

你可能感兴趣的:(DevExpress XtraGrid 添加列Column)