Private void DataGrid1_leave (Object Sender, System.EventArgs E)
{
CurrencyManager mycurrencymanager = (currenufactageManager) DataGrid1.bindingContext [dataGrid1.datasource, DataGrid1.datamember];
INT rowtoedit = mycurrencymanager.position;
DataGridColumnStyle DGC = DataGrid1.tablestyles [0] .gridcolumnstyles [0];
DataGrid1.Endedit (DGC, RowToEdit, False);
Mycurrencymanager.endcurrendedit ();
//mycurrencymanager.refresh ();
}