04-07-13, 01:36 AM
السلام عليكم
تم تجريب الكود الذي تفضل به اخي
kslawy
[HTML]Try
If DataGridView1.RowCount > 0 Then
If DataGridView1.SelectedRows.Count > 0 Then
Dim dgvr As DataGridViewRow = DataGridView1.SelectedRows(0)
With dgvr
Delete_frm.txt_Zatea_id.Text = GetCellsValue(dgvr.Cells(0))
Delete_frm.txt_Customer.Text = GetCellsValue(dgvr.Cells(1))
Delete_frm.ListBox1.Text = GetCellsValue(dgvr.Cells(3))
Delete_frm.txt_Area.Text = GetCellsValue(dgvr.Cells(2))
Delete_frm.txt_Phone1.Text = GetCellsValue(dgvr.Cells(4))
Delete_frm.txt_Phone2.Text = GetCellsValue(dgvr.Cells(5))
Delete_frm.txt_fax.Text = GetCellsValue(dgvr.Cells(7))
Delete_frm.txt_Mobile.Text = GetCellsValue(dgvr.Cells(6))
Delete_frm.txt_Email.Text = GetCellsValue(dgvr.Cells(8))
Delete_frm.txt_Note.Text = GetCellsValue(dgvr.Cells(9))
End With
End If
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, Me.Text)
End Try[/HTML]
ولكني حصلت على رسالة خطاً
كما هي بالصورة المرفقة
اعمل على win8 + vb12
[ATTACH=CONFIG]3277[/ATTACH]
تم تجريب الكود الذي تفضل به اخي
kslawy
[HTML]Try
If DataGridView1.RowCount > 0 Then
If DataGridView1.SelectedRows.Count > 0 Then
Dim dgvr As DataGridViewRow = DataGridView1.SelectedRows(0)
With dgvr
Delete_frm.txt_Zatea_id.Text = GetCellsValue(dgvr.Cells(0))
Delete_frm.txt_Customer.Text = GetCellsValue(dgvr.Cells(1))
Delete_frm.ListBox1.Text = GetCellsValue(dgvr.Cells(3))
Delete_frm.txt_Area.Text = GetCellsValue(dgvr.Cells(2))
Delete_frm.txt_Phone1.Text = GetCellsValue(dgvr.Cells(4))
Delete_frm.txt_Phone2.Text = GetCellsValue(dgvr.Cells(5))
Delete_frm.txt_fax.Text = GetCellsValue(dgvr.Cells(7))
Delete_frm.txt_Mobile.Text = GetCellsValue(dgvr.Cells(6))
Delete_frm.txt_Email.Text = GetCellsValue(dgvr.Cells(8))
Delete_frm.txt_Note.Text = GetCellsValue(dgvr.Cells(9))
End With
End If
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Exclamation, Me.Text)
End Try[/HTML]
ولكني حصلت على رسالة خطاً
كما هي بالصورة المرفقة
اعمل على win8 + vb12
[ATTACH=CONFIG]3277[/ATTACH]
