C#之DataGridView获取用户选择的行的数据...

 

 

//获取用户选择的行的数据...
            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);

posted @ 2012-03-25 14:59  氺〤魚Oo。  阅读(275)  评论(0编辑  收藏  举报