Private Sub QuotationsDataGridView_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles QuotationsDataGridView.CellClick If e.RowIndex < 0 OrElse Not e.ColumnIndex = QuotationsDataGridView.Columns(3).Index Then If e.RowIndex < 0 OrElse Not e.ColumnIndex = QuotationsDataGridView.Columns(4).Index Then Else For Each roww As DataGridViewRow In Me.QuotationsDataGridView.Rows If roww.Cells(0).Value = Me.QuotationsDataGridView.CurrentRow.Cells(0).Value Then roww.Cells(4).Value = False End If Next End If Else Try If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then QuotationsDataGridView.Rows(e.RowIndex).Cells(3).Value = OpenFileDialog1.SafeFileName My.Computer.FileSystem.CopyFile(OpenFileDialog1.FileName, path("Quotations") & "\" & OpenFileDialog1.SafeFileName) audit("Attached quotation to Purchase request no " & QuotationsDataGridView.Rows(e.RowIndex).Cells(0).Value) End If Catch ex As Exception End Try End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)