When overridden in a deriving class, prepares a cell for editing.
[Visual Basic] Overloads MustOverride Public Sub Edit( _ ByVal source As ListManager, _ ByVal rowNum As Integer, _ ByVal bounds As Rectangle, _ ByVal readOnly As Boolean, _ ByVal instantText As String, _ ByVal cellIsVisible As Boolean _ ) [C#] public abstract void Edit( ListManager source, int rowNum, Rectangle bounds, bool readOnly, string instantText, bool cellIsVisible ); [C++] public: virtual void Edit( ListManager* source, int rowNum, Rectangle bounds, bool readOnly, String* instantText, bool cellIsVisible ) = 0; [JScript] public abstract function Edit( source : ListManager, rowNum : int, bounds : Rectangle, readOnly : Boolean, instantText : String, cellIsVisible : Boolean );
Typically, Edit sites a control onto the grid at the location of the cell being edited.
The following example shows a possible override of the Edit method.
[Visual Basic]
Overloads Overrides Sub OnEdit(ByVal source As Data.System.Data.DataView, _ ByVal rowNum As Long, ByVal bounds As UI.System.Drawing.Rectangle, _ ByVal readOnly As Boolean) Dim originalBounds As System.Drawing.Rectangle Set originalBounds = bounds ' Set a property determining if a hosted control is read only. ' The hosted control is named myControl. myControl.ReadOnly End Sub
DataGridColumn Class | DataGridColumn Members | System.WinForms Namespace | DataGridColumn.Edit Overload List