//获取用户选择的行的数据...
            String str = "开户公司/网址:";
            str+= this.dataGridView.CurrentRow.Cells[1].Value.ToString();

            //加列名
            str += "\n\n用户名/卡号:";
            str += this.dataGridView.CurrentRow.Cells[2].Value.ToString();

            //加列名
            str += "\n\n密码:";
            str += this.dataGridView.CurrentRow.Cells[3].Value.ToString();

            MessageBox.Show("你确定要删除该条记录吗?\n\n"+str);


本文转载:CSDN博客