وجدت طريقة وهي عرض البيانات من جدول قاعدة البيانات واضافتها في الخلية مرة اخري
كود :
وهذا هو الكود للفائدة
Using connection As New OleDbConnection(constr)
Dim command As New OleDbCommand("Select Name,Email,CountryCode,Budget,mcam from customer WHERE CustomerID=" & DataGridView1.CurrentRow.Cells(0).Value.ToString() & " ORDER BY CustomerID DESC ", connection)
connection.Open()
Dim reader As OleDbDataReader = command.ExecuteReader()
While reader.Read()
Console.WriteLine(reader(0).ToString())
If e.ColumnIndex = 1 Then
DataGridView1(e.ColumnIndex, e.RowIndex).Value = Trim((reader("Name").ToString()))
ElseIf e.ColumnIndex = 2 Then
DataGridView1(e.ColumnIndex, e.RowIndex).Value = Trim((reader("Email").ToString()))
ElseIf e.ColumnIndex = 3 Then
DataGridView1(e.ColumnIndex, e.RowIndex).Value = Trim((reader("CountryCode").ToString()))
ElseIf e.ColumnIndex = 4 Then
DataGridView1(e.ColumnIndex, e.RowIndex).Value = Trim((reader("Budget").ToString()))
ElseIf e.ColumnIndex = 5 Then
DataGridView1(e.ColumnIndex, e.RowIndex).Value = Trim((reader("mcam").ToString()))
End If
End While
reader.Close()
End Using