24-03-14, 10:39 PM
السلام عليكم ورحمة الله
لنفترض أنك أسميت الـDataGrid بـ dgv_Customers
في حدث النقر المزدوج على هذا الـDataGrid، اكتب:
مع مراعاة اسماء صناديق النصوص في برنامجك
لنفترض أنك أسميت الـDataGrid بـ dgv_Customers
في حدث النقر المزدوج على هذا الـDataGrid، اكتب:
كود :
If dgv_Customers.CurrentRow.Cells(0).Value <> Nothing Then
txtCustomerID.Text = Val(dgv_Customers.CurrentRow.Cells(0).Value)
txtCustomerName.Text = dgv_Customers.CurrentRow.Cells(1).Value
txtCustomerAddress.Text = dgv_Customers.CurrentRow.Cells(3).Value
else
msgbox("row is empty")
End If

