منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : احتاج مساعدة جزاكم الله خيرا
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
عندما اقم بربط  txtbox ب DB تضهر لي هده الرسالة 
Index was out of range. Must be non-negative and less than the size of the collection.
هدا هو الكود:


Sub AtcherTxt()
        Try
            If Dgvfournisseurs.CurrentRow IsNot Nothing Then
                Txtcod.Text = Dgvfournisseurs.CurrentRow.Cells(0).Value
                Txtnom.Text = Dgvfournisseurs.CurrentRow.Cells(1).Value
                Txcopa.Text = Dgvfournisseurs.CurrentRow.Cells(2).Value
                Txtadresse.Text = Dgvfournisseurs.CurrentRow.Cells(3).Value
                Txtaptente.Text = Dgvfournisseurs.CurrentRow.Cells(4).Value
                Txtrecorde.Text = Dgvfournisseurs.CurrentRow.Cells(5).Value
                Txttele1.Text = Dgvfournisseurs.CurrentRow.Cells(6).Value
                Txttele2.Text = Dgvfournisseurs.CurrentRow.Cells(7).Value
                Txtfax.Text = Dgvfournisseurs.CurrentRow.Cells(8).Value
                Txtiail.Text = Dgvfournisseurs.CurrentRow.Cells(9).Value
                Txtnot.Text = Dgvfournisseurs.CurrentRow.Cells(10).Value
            End If
        Catch ex As Exception

 ارجو المساعدة وشكرا.