The following example demonstrates how to create a column within a View, and assign a specific editor to it.
C#
using DevExpress.XtraGrid.Views.BandedGrid;
using DevExpress.XtraEditors.Repository;
//...
BandedGridColumn col = advBandedGridView1.Columns.Add("Country") as BandedGridColumn;
advBandedGridView1.Bands[0].Columns.Add(col);
col.Visible = true;
RepositoryItemLookUpEdit columnEditor = new RepositoryItemLookUpEdit();
//customizing the column editor
//...
gridControl1.RepositoryItems.Add(columnEditor);
col.ColumnEdit = columnEditor;
VB
Imports DevExpress.XtraGrid.Views.BandedGrid
Imports DevExpress.XtraEditors.Repository
'...
Dim col As BandedGridColumn = CType(AdvBandedGridView1.Columns.Add("Country"), _
BandedGridColumn)
AdvBandedGridView1.Bands(0).Columns().Add(col)
col.Visible = True
Dim columnEditor As RepositoryItemLookUpEdit = New RepositoryItemLookUpEdit
'customizing the column editor
'...
GridControl1.RepositoryItems.Add(columnEditor)
col.ColumnEdit = columnEditor
No comments:
Post a Comment