تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
[سؤال] مساعدة في نقل البيانات من DataGridView الى تكسات
#17


http://im75.gulfup.com/c3ZIm9.jpg



Private Sub DataGridView1_CurrentCellDirtyStateChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGridView1.CurrentCellDirtyStateChanged

DataGridView1.EndEdit()

TextBox1.Clear()
TextBox2.Clear()
TextBox3.Clear()

TextBox4.Clear()
TextBox5.Clear()
TextBox6.Clear()

TextBox7.Clear()
TextBox8.Clear()
TextBox9.Clear()

Dim i As New List(Of Integer)

For Each r As DataGridViewRow In DataGridView1.Rows

If r.Cells(0).Value = True Then

i.Add(r.Index)

If i.Count = 3 Then

Dim r1 As DataGridViewRow = DataGridView1.Rows(i(0))
TextBox1.Text = r1.Cells(1).Value
TextBox2.Text = r1.Cells(2).Value
TextBox3.Text = r1.Cells(3).Value

Dim r2 As DataGridViewRow = DataGridView1.Rows(i(1))
TextBox4.Text = r2.Cells(1).Value
TextBox5.Text = r2.Cells(2).Value
TextBox6.Text = r2.Cells(3).Value

Dim r3 As DataGridViewRow = DataGridView1.Rows(i(2))
TextBox7.Text = r3.Cells(1).Value
TextBox8.Text = r3.Cells(2).Value
TextBox9.Text = r3.Cells(3).Value

Exit For

End If

End If

Next

End Sub

الرد }}}
تم الشكر بواسطة: raoe-041 , EYADISMAIL , EYADISMAIL


الردود في هذا الموضوع
RE: مساعدة في نقل البيانات من DataGridView الى تكسات - بواسطة sami2015 - 18-01-15, 04:59 PM


التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم