GridViewControl页面间三种传值方法

版权声明:版权声明:本文为博主原创文章,转载请注明出处 https://blog.csdn.net/yehangyu0525/article/details/82759717
GridViewControl 单选框选中行页面之间传值
1. 第一种用构造方法传值
FormGetDuty frm = new FormGetDuty
(strdebugPeople, strCRAFTPLANID, "质检推送按钮");
                    frm.Show();
  1. 第二种只传页面选中行
/// <summary>
        /// 获取責任人选中的行
        /// </summary>
        /// <returns></returns>
        public DataRowView GetChooseRowsQulity()
        {//zhangj 20170630
            DataRowView drv = this.bindingSource1.Current as DataRowView;
            return drv;
        }
        //在使用界面调用其方法
        DataRow[] drs = frm.GetChooseRowsQulity();
  1. 第三种传复选框选中行
/// <summary>
        /// yehy 20180911 获取调试人员选中的行
        /// </summary>
        /// <returns></returns>
        public DataRow[] GetChooseRowsQulity()
        {
            this.Validate();
            return this.dstGetDuty5.Tables[0].Select("ISSELECT=True");
        }
          //在使用界面调用其方法
        DataRow[] drs = frm.GetChooseRowsQulity();

4.复选框选中最简单实现方法

gridviewControl实现多行批量处理

猜你喜欢

转载自blog.csdn.net/yehangyu0525/article/details/82759717