Private Sub btnUpdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs ) Handles btnUpdate.Click Try Dim j As Integer If MsgBox("Are you Sure ?", MsgBoxStyle.YesNo + MsgBoxStyle.Critical, "Confirmation") = MsgBoxResult.Yes Then For j = 0 To Me.dgdvConStatus.Rows.Count - 1 Dim ck As DataGridViewCheckBoxCell Dim nrow1 As Integer = j ck = Me.dgdvConStatus.Rows(j).Cells("chkstatus") If ck.Value = True Then g_objDbAccess.UpdateContentLocally( Me.dgdvConStatus.Rows(j).Cells(1).Value(), "1") ElseIf ck.Value = False Then g_objDbAccess.UpdateContentLocally( Me.dgdvConStatus.Rows(j).Cells(1).Value(), "0") End If Next MsgBox( "Content Status Updation done Successfully") End If Catch ex As Exception MsgBox( " Error : " & ex.Message) End Try End Sub