public void AddNewRow <T>(T obj) where T : class { Gridview.AddNewRow(); var rowHandle = Gridview.GetRowHandle(Gridview.DataRowCount); if (Gridview.IsNewItemRow(rowHandle)) { UpdateRow(rowHandle, obj); } }