private void WorldListErrorHandler( object sender, DataGridViewDataErrorEventArgs e ) { if ( e.Exception is FormatException ) { string columnName = dgvWorlds.Columns[e.ColumnIndex].HeaderText; MessageBox.Show( e.Exception.Message, "Error editing " + columnName ); } else { MessageBox.Show( e.Exception.ToString(), "An error occured in the world list" ); } }