有时候我们需要详细展示数据源的含义,这时候就需要用到 RepositoryItemLookUpEdit
展示:
代码详情:
ColumnData = new DevExpress.XtraGrid.Columns.GridColumn();
ColumnData.Caption = "状态";
ColumnData.Visible = true;
ColumnData.OptionsColumn.FixedWidth = false;
ColumnData.Width = ;
ColumnData.FieldName = "STATUS";
ColumnData.VisibleIndex = linecount++;
ColumnData.OptionsColumn.AllowEdit = false;
RepositoryItemLookUpEdit m_StatusRepositoryItemLookUpEdit = new RepositoryItemLookUpEdit();
ColumnData.ColumnEdit = m_StatusRepositoryItemLookUpEdit;
m_StatusRepositoryItemLookUpEdit.DisplayMember = "Display";
m_StatusRepositoryItemLookUpEdit.ValueMember = "Value";
m_StatusRepositoryItemLookUpEdit.DataSource = new StatusDisplay().GetData();
rtn.Add(ColumnData);