تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
مشكلة في الداتا جريد
#5
(12-02-20, 02:24 PM)bassant كتب :
(11-02-20, 06:27 PM)اسامه الهرماوي كتب : السلام عليكم...
ممكن الكود المستخدم لتصحيحة.

        Dim xl As Integer
        xl = DataGridView1.CurrentRow.Index
        TextBox10.Text = CStr(DataGridView1.Rows(xl).Cells(0).Value)
        TextBox17.Text = CStr(DataGridView1.Rows(xl).Cells(1).Value)
        TextBox2.Text = CStr(DataGridView1.Rows(xl).Cells(2).Value)
         
        DateTimePicker3.Text = DataGridView1.Rows(xl).Cells(3).Value

كود :
Private Sub DataGridView1_CellClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellClick
   Dim r = DataGridView1.CurrentRow
   If r IsNot Nothing Then
       TextBox10.Text = CStr(r.Cells(0).Value)
       TextBox17.Text = CStr(r.Cells(1).Value)
       TextBox2.Text = CStr(r.Cells(2).Value)
       If IsDate(r.Cells(3).Value.ToString) Then
           DateTimePicker3.Value = CDate(r.Cells(3).Value.ToString)
       End If
   End If
End Sub
الرد }}}
تم الشكر بواسطة: asemshahen5 , alshandodi


الردود في هذا الموضوع
مشكلة في الداتا جريد - بواسطة bassant - 11-02-20, 02:45 PM
RE: مشكلة في الداتا جريد - بواسطة bassant - 12-02-20, 11:03 AM
RE: مشكلة في الداتا جريد - بواسطة bassant - 12-02-20, 02:24 PM
RE: مشكلة في الداتا جريد - بواسطة alsalamoni - 12-02-20, 03:15 PM


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


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