// old-style writing
if (string.IsNullOrEmpty(gridView1.GetRowCellValue(i, "Ghichu").ToString()))
//new style writing
if (string.IsNullOrEmpty(GetGridCellValue(i, "Ghichu").ToString()))
//Declare complement the new style writing
public delegate void GridGetEventArg(int rowHandle, string fieldname);
private string GetGridCellValue(int row, string fieldname)
{
if (gridControl1.InvokeRequired)
{
GridGetEventArg get = new GridGetEventArg(GetGridCellValue); //Error 1 'string Vidu.frmTinh.GetGridCellValue(int, string)' has the wrong return type
return gridControl1.Invoke(get, new object[] { row, fieldname });//Error 2 Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)
}
else
{
return (gridControl1.MainView as GridView).GetRowCellValue(row, fieldname);//Error 3 Cannot implicitly convert type 'object' to 'string'. An explicit conversion exists (are you missing a cast?)