FlexGrid for WinForms
Editor Property (RowCol)
Example 



Gets or sets the custom editor used to edit cells in this column.
Syntax
'Declaration
 
<DefaultValueAttribute()>
<TypeConverterAttribute("C1.Win.C1FlexGrid.Design.GridColumnEditorConverter, C1.Win.C1FlexGrid.4.Design")>
Public Overridable Property Editor As Control
'Usage
 
Dim instance As RowCol
Dim value As Control
 
instance.Editor = value
 
value = instance.Editor
[DefaultValue()]
[TypeConverter("C1.Win.C1FlexGrid.Design.GridColumnEditorConverter, C1.Win.C1FlexGrid.4.Design")]
public virtual Control Editor {get; set;}
[DefaultValue()]
[TypeConverter("C1.Win.C1FlexGrid.Design.GridColumnEditorConverter, C1.Win.C1FlexGrid.4.Design")]
public:
virtual property Control^ Editor {
   Control^ get();
   void set (    Control^ value);
}
Remarks

The grid provides several built-in editors that are automatically selected based on the properties of the cell being edited.

This property allows you to use external editors when editing values in a given column. Any control can be used as an external editor, but to achieve complete integration with the grid, the external editor should implement the IC1EmbeddedEditor interface.

You can associate external editors with columns at design time (using the grid's Column Editor) or at run time, by setting this property.

Example

The code below creates a C1DateEdit control and assigns it to the Editor property of a grid column. The control will be used to edit cells on this column instead of the default System.Windows.Forms.DateTimePicker control.

All controls in the C1Input library implement the IC1EmbeddedEditor interface and can be used as grid editors without any extra code.

// create C1DateEdit control (included with C1Input)
C1DateEdit dateEdit = new C1DateEdit();
            
// use the new control as an editor for a grid column
_flex.Cols[1].DataType = typeof(DateTime);
_flex.Cols[1].Editor = c1DateEdit;
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

RowCol Class
RowCol Members

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Send Feedback