event UserEditorClose (Object as Object, Item as HITEM, ColIndex as Long)
Fired the user editor is about to be opened.

TypeDescription
Object as Object An object created by UserEditor property.
Item as HITEM A long expression that determines the item's handle. If the Item parameter is 0, and the ColIndex property is different than zero, the ColIndex indicates the handle of the cell where the state is changed.
ColIndex as Long A long expression that indicates the column's index, if the Item parameter is not zero, a long expression that indicates the handle of the cell if the Item parameter is 0.

Use the UserEditorClose event to notify your application when the user editor is hidden. Use the UserEditorClose event to update the cell's value when user editor is hidden. The control fires UserEditorOleEvent event each time when a an user editor object fires an event.

Syntax for UserEditorClose event, /NET version, on:

private void UserEditorClose(object sender,object Obj,int Item,int ColIndex)
{
}

Private Sub UserEditorClose(ByVal sender As System.Object,ByVal Obj As Object,ByVal Item As Integer,ByVal ColIndex As Integer) Handles UserEditorClose
End Sub

Syntax for UserEditorClose event, /COM version, on:

private void UserEditorClose(object sender, AxEXGRIDLib._IGridEvents_UserEditorCloseEvent e)
{
}

void OnUserEditorClose(LPDISPATCH Object,long Item,long ColIndex)
{
}

void __fastcall UserEditorClose(TObject *Sender,IDispatch *Object,Exgridlib_tlb::HITEM Item,long ColIndex)
{
}

procedure UserEditorClose(ASender: TObject; Object : IDispatch;Item : HITEM;ColIndex : Integer);
begin
end;

procedure UserEditorClose(sender: System.Object; e: AxEXGRIDLib._IGridEvents_UserEditorCloseEvent);
begin
end;

begin event UserEditorClose(oleobject Object,long Item,long ColIndex)
end event UserEditorClose

Private Sub UserEditorClose(ByVal sender As System.Object, ByVal e As AxEXGRIDLib._IGridEvents_UserEditorCloseEvent) Handles UserEditorClose
End Sub

Private Sub UserEditorClose(ByVal Object As Object,ByVal Item As EXGRIDLibCtl.HITEM,ByVal ColIndex As Long)
End Sub

Private Sub UserEditorClose(ByVal Object As Object,ByVal Item As Long,ByVal ColIndex As Long)
End Sub

LPARAMETERS Object,Item,ColIndex

PROCEDURE OnUserEditorClose(oGrid,Object,Item,ColIndex)
RETURN

Syntax for UserEditorClose event, /COM version (others), on:

<SCRIPT EVENT="UserEditorClose(Object,Item,ColIndex)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function UserEditorClose(Object,Item,ColIndex)
End Function
</SCRIPT>

Procedure OnComUserEditorClose Variant llObject HITEM llItem Integer llColIndex
	Forward Send OnComUserEditorClose llObject llItem llColIndex
End_Procedure

METHOD OCX_UserEditorClose(Object,Item,ColIndex) CLASS MainDialog
RETURN NIL

void onEvent_UserEditorClose(COM _Object,int _Item,int _ColIndex)
{
}

function UserEditorClose as v (Object as P,Item as OLE::Exontrol.Grid.1::HITEM,ColIndex as N)
end function

function nativeObject_UserEditorClose(Object,Item,ColIndex)
return

The following VB sample updates the cell's value when the user editor is hidden ( the sample handles the event for an exMaskEdit inside ):

Private Sub Grid1_UserEditorClose(ByVal Object As Object, ByVal Item As EXGRIDLibCtl.HITEM, ByVal ColIndex As Long)
    With Grid1.Items
        .CellValue(Item, ColIndex) = Object.Text
    End With
End Sub

The following C++ sample updates the cell's value when the user editor is hidden ( the sample handles the event for an exMaskEdit inside ):

#import <maskedit.dll>

#include "Items.h"

void OnUserEditorCloseGrid1(LPDISPATCH Object, long Item, long ColIndex) 
{
	MaskEditLib::IMaskEditPtr spMaskEdit( Object );
	if ( spMaskEdit != NULL )
	{
		COleVariant vtNewValue(spMaskEdit->GetText());
		m_grid.GetItems().SetCellValue( COleVariant( Item ), COleVariant( ColIndex ), vtNewValue );
	}
}

where the #import <maskedit.dll> defines the type library of the exMaskEdit component, in the MaskEditLib namespace.  The V2S function converts a VARIANT value to a string value and may look like follows:

static CString V2S( VARIANT* pv, LPCTSTR szDefault = _T("") )
{
	if ( pv )
	{
		if ( pv->vt == VT_ERROR )
			return szDefault;

		COleVariant vt;
		vt.ChangeType( VT_BSTR, pv );
		return V_BSTR( &vt );
	}
	return szDefault;
}

The following VB.NET sample updates the cell's value when the user editor is hidden ( the sample handles the event for an exMaskEdit inside ):

Private Sub AxGrid1_UserEditorClose(ByVal sender As Object, ByVal e As AxEXGRIDLib._IGridEvents_UserEditorCloseEvent) Handles AxGrid1.UserEditorClose
    With AxGrid1.Items
        .CellValue(e.item, e.colIndex) = e.object.Text
    End With
End Sub

The following C# sample updates the cell's value when the user editor is hidden ( the sample handles the event for an exMaskEdit inside ):

private void axGrid1_UserEditorClose(object sender, AxEXGRIDLib._IGridEvents_UserEditorCloseEvent e)
{
	MaskEditLib.MaskEdit maskEdit = e.@object as MaskEditLib.MaskEdit;
	if (maskEdit != null)
		axGrid1.Items.set_CellValue(e.item, e.colIndex, maskEdit.Text);
}

where the MaskEditLib class is defined by adding a new reference to the ExMaskEdit component to your project.

The following VFP sample updates the cell's value when the user editor is hidden ( the sample handles the event for an exMaskEdit inside ):

*** ActiveX Control Event ***
LPARAMETERS object, item, colindex

with thisform.Grid1.Items
	.DefaultItem = item
	.CellValue( 0, colindex ) = object.Text()
endwith