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);
                }
            }
  • 相关阅读:
    RAID实战案例
    文件系统常用工具实战篇
    挂载文件系统
    硬盘结构类型概述
    创建文件系统实战篇
    JumpServer的会话管理及命令过滤器应用案例
    JumpServer的权限管理
    JumpServer的用户管理
    helm基础
    hpa控制器
  • 原文地址:https://www.cnblogs.com/pyf97/p/14231348.html
Copyright © 2011-2022 走看看