>'MainForm function > > Private Sub BtnBatch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnBatch.Click > BatchGrant.ShowDialog() > End Sub > > Public Sub updateDatagridviewRecords() > For Each r As DataGridViewRow In AccessrightDataGridView.SelectedRows 'In this can't detect my seleted rows? > r.Cells(4).Value = OptionForm.CheckBoxCanass.Checked > r.Cells(5).Value = OptionForm.CheckBoxCannew.Checked > r.Cells(6).Value = OptionForm.CheckBoxcanmdy.Checked > r.Cells(7).Value = OptionForm.CheckBoxcandel.Checked > r.Cells(8).Value = OptionForm.CheckBoxcanprn.Checked > r.Cells(9).Value = OptionForm.CheckBoxcanhld.Checked > r.Cells(10).Value = OptionForm.CheckBoxcanuhd.Checked > r.Cells(11).Value = OptionForm.CheckBoxviewcost.Checked > r.Cells(12).Value = OptionForm.CheckBoxViewprice.Checked > r.Cells(13).Value = OptionForm.CheckBoxCanexp.Checked > Next > End Sub > > >'OptionForm > > Private Sub BtnGrant_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnGrant.Click > MainForm.updateDatagridviewRecords() > End Sub > >