【问题标题】:looking for events for datagridview寻找 datagridview 的事件
【发布时间】:2014-08-31 09:55:41
【问题描述】:

我正在创建 DatagridView 的 UserControl 我正在寻找现场休假的事件 我的意思是失去了对任何领域的关注

例如:

您在编辑模式下看到它(在姓氏的第一行),我想在每次编辑任何字段后失去焦点时使用事件 我可以使用哪些事件?

我不能使用datagridview.click,因为只有当我失去对另一列的关注但我想如果我点击仍然失去焦点的“第二个”按钮时才使用它

此外,我还需要编辑另外 1 个事件 错误时,我的意思是如果我输入 int 字段,我会写信,我希望它显示错误

【问题讨论】:

    标签: c# events datagridview


    【解决方案1】:

    您正在寻找DataGridView.CellEndEdit 事件

    【讨论】:

    • ty 找到并且它工作完美你能再次帮助我吗?我想找到发生或错误的事件,或者在它编辑列/行之前,就像我输入字符串到 Int 我想要事件来检查它或事件发生错误
    • 谢谢你们这两个他们太完美了!!!! :) private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) { ad.update(); } private void dataGridView1_DataError(object sender, DataGridViewDataErrorEventArgs e) { e.Cancel = false; MessageBox.Show("שגיאה בסוג נתונים"); }
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2010-10-07
    • 2021-06-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多