property Column.Editor as Editor
Gets the column's editor object.

 TypeDescription 
   Editor An Editor object that is associated to the column.  

Use the Editor object to assign the same type of editor to all cells in the column. The Editor objects holds information about editing cells in the column. Use the EditType property to specify the column's edit type. Use the CellEditor property to assign a particular editor to a cell. Use the CellEditorVisible property to hide the cell's editor. Use the CellValue property to assign a value to a cell. 

The following VB sample assigns a date editor to the first column:

With Grid1.Columns(0).Editor
    .EditType = DateType
End With

The following C++ sample assigns a date editor to the first column:

#include "Column.h"
#include "Columns.h"
CColumn column = m_grid.GetColumns().GetItem( COleVariant( long(0) ) );
CEditor editor = column.GetEditor();
editor.SetEditType( 7/*DateType*/ );

The following VB.NET sample assigns a date editor to the first column:

With AxGrid1.Columns(0).Editor
    .EditType = EXGRIDLib.EditTypeEnum.DateType
End With

The following C# sample assigns a date editor to the first column:

EXGRIDLib.Editor editor = axGrid1.Columns[0].Editor;
editor.EditType = EXGRIDLib.EditTypeEnum.DateType;

The following VFP sample assigns a date editor to the first column:

with thisform.Grid1.Columns.Item(0).Editor
	.EditType = 7 && DateType
endwith

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.