It will ask the user for conformation. Just follow the simple steps given below:
private void Btn_Hide_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Are You sure, You want to Delete?", "Delete Information", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes){
datagridView.Columns[datagridView.CurrentCellAddress.X].Visible = false;
}
}