就是这样的啊!我在datagridview 中加了个 DataGridViewCheckBoxColumn 绑定数据库的啊!可是我写好事件后!执行时候!
只有你按一下,它就说你未修改!可是我修改了啊!按两下就行啊!why
你们看看一下代码!哪里不足谢谢!
 private void toolStripButton_huifangneirongbaochu_Click(object sender, EventArgs e)
        {
            label1.Focus();
            if (dataGridView1.Rows.Count > 0)
            {
                if (ds.HasChanges())
                {
                    for (int i = 0; i < dataGridView1.Rows.Count - 1; i++)
                    {
                        if (dataGridView1.Rows[i].Cells["题库代码"].Value.ToString().Trim() != "")
                        {
                            bool zf = bool.Parse(dataGridView1.Rows[i].Cells["作废否"].EditedFormattedValue.ToString());
                            string tknr = dataGridView1.Rows[i].Cells["回访内容"].Value.ToString().Trim();
                            int tkdm = int.Parse(dataGridView1.Rows[i].Cells["题库代码"].Value.ToString().Trim());                            khjb_hfxxtk.KeHuJiBen_HuiFangTiKu_update(zf, tknr, tkdm);
                        }
                        if (dataGridView1.Rows[i].Cells["题库代码"].Value.ToString().Trim() == "")
                        {
                            bool zf = bool.Parse(dataGridView1.Rows[i].Cells["作废否"].EditedFormattedValue.ToString());
                            string tknr = dataGridView1.Rows[i].Cells["回访内容"].Value.ToString().Trim();
                            khjb_hfxxtk.KeHuJiBen_HuiFangTiKu_insert(zf, tknr);                        }                    }
                    if (MessageBox.Show("操作成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information) == DialogResult.OK)
                    {
                        ZhuJieMian_HuiFangTiKu_Load(null, null);                    }                }
                else                { MessageBox.Show("目前您还没有对表里的任何数据进行修改,无须保存!", "系统信息提示信息!", MessageBoxButtons.OK, MessageBoxIcon.Information); }
            }        }