zoukankan      html  css  js  c++  java
  • C# 解决 DataGridView 选择按钮后台修改以后页面不更新

      private void GVWuserTran_CellContentClick(object sender, DataGridViewCellEventArgs e)
            {
                if (GVWuserTran.Columns[e.ColumnIndex].Name == "chk")
                {
                    if (NOTBatchReview != null && NOTBatchReview.IndexOf(GVWuserTran.Rows[e.RowIndex].Cells["NodeName"].Value.ToString()) > -1)
                    {
                        MessageBox.Show("当前节点不能批量审核!", "温馨提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        GVWuserTran.BeginEdit(!false);
                        GVWuserTran.Rows[e.RowIndex].Cells["chk"].Value = false;//修改选择框选中状态;
                        GVWuserTran.EndEdit();
                    }
    
                }
            }
            /// <summary>
            /// CurrentCellDirtyStateChanged 方法提交
            /// </summary>
            /// <param name="sender"></param>
            /// <param name="e"></param>
            private void GVWuserTran_CurrentCellDirtyStateChanged(object sender, EventArgs e)
            {
                if (this.GVWuserTran.IsCurrentCellDirty)
                {
                    this.GVWuserTran.CommitEdit(DataGridViewDataErrorContexts.Commit);
                }
            }
  • 相关阅读:
    整数反转问题--正确率极低
    May LeetCoding Challenge9 之 求方差
    May LeetCoding Challenge8 之 交叉相乘
    EXCEL上传DEMO
    三层BOM
    OO alv 获取选择列
    PS 项目创建
    读取EXCEL到内表
    SAP XML 到 内表
    BOM 复制功能
  • 原文地址:https://www.cnblogs.com/pyf97/p/14231348.html
Copyright © 2011-2022 走看看