23-07-23, 12:09 AM
السلام عليكم ورحمة الله وبركاته
اسعد الله اوقاتكم اخواني الاعزاء
سؤالي : كيف يمكن نقل بيانات من مجموعة تكس بوكس لها خاصية ال MULTILINE
بحيث جميع بيانات السطر الاول لكل تكس بوكس ينتقل الى الصف الاول في الجريد فيو
وبيانات الصف الثاني لكل التكس بوكس ينتقل الى الصف الثاني في الجريدفيو و................هكذا
الصورة المرفقة توضح المطلوب:
استخدمت هذا الكود ولكن لم ينفع
DataGridView1.Rows.Clear()
On Error Resume Next
For i As Integer = 0 - 1 To DataGridView1.Rows.Add
DataGridView1.Rows.Item(i).Cells(0).Value = TextBox1.Lines(0).ToString
DataGridView1.Rows.Item(i).Cells(1).Value = TextBox1.Lines(0).ToString
DataGridView1.Rows.Item(i).Cells(2).Value = TextBox1.Lines(0).ToString
DataGridView1.Rows.Item(i).Cells(3).Value = TextBox1.Lines(0).ToString
DataGridView1.Rows.Item(i).Cells(0).Value = TextBox1.Lines(1).ToString
DataGridView1.Rows.Item(i).Cells(1).Value = TextBox1.Lines(1).ToString
DataGridView1.Rows.Item(i).Cells(2).Value = TextBox1.Lines(1).ToString
DataGridView1.Rows.Item(i).Cells(3).Value = TextBox1.Lines(1).ToString
DataGridView1.Rows.Item(i).Cells(0).Value = TextBox1.Lines(2).ToString
DataGridView1.Rows.Item(i).Cells(1).Value = TextBox1.Lines(2).ToString
DataGridView1.Rows.Item(i).Cells(2).Value = TextBox1.Lines(2).ToString
DataGridView1.Rows.Item(i).Cells(3).Value = TextBox1.Lines(2).ToString
Next
ارجو التكرم بالتعديل على الكود علما بأن عدد الاسطر في التكس بوكس غير محدد
اسعد الله اوقاتكم اخواني الاعزاء
سؤالي : كيف يمكن نقل بيانات من مجموعة تكس بوكس لها خاصية ال MULTILINE
بحيث جميع بيانات السطر الاول لكل تكس بوكس ينتقل الى الصف الاول في الجريد فيو
وبيانات الصف الثاني لكل التكس بوكس ينتقل الى الصف الثاني في الجريدفيو و................هكذا
الصورة المرفقة توضح المطلوب:
استخدمت هذا الكود ولكن لم ينفع
DataGridView1.Rows.Clear()
On Error Resume Next
For i As Integer = 0 - 1 To DataGridView1.Rows.Add
DataGridView1.Rows.Item(i).Cells(0).Value = TextBox1.Lines(0).ToString
DataGridView1.Rows.Item(i).Cells(1).Value = TextBox1.Lines(0).ToString
DataGridView1.Rows.Item(i).Cells(2).Value = TextBox1.Lines(0).ToString
DataGridView1.Rows.Item(i).Cells(3).Value = TextBox1.Lines(0).ToString
DataGridView1.Rows.Item(i).Cells(0).Value = TextBox1.Lines(1).ToString
DataGridView1.Rows.Item(i).Cells(1).Value = TextBox1.Lines(1).ToString
DataGridView1.Rows.Item(i).Cells(2).Value = TextBox1.Lines(1).ToString
DataGridView1.Rows.Item(i).Cells(3).Value = TextBox1.Lines(1).ToString
DataGridView1.Rows.Item(i).Cells(0).Value = TextBox1.Lines(2).ToString
DataGridView1.Rows.Item(i).Cells(1).Value = TextBox1.Lines(2).ToString
DataGridView1.Rows.Item(i).Cells(2).Value = TextBox1.Lines(2).ToString
DataGridView1.Rows.Item(i).Cells(3).Value = TextBox1.Lines(2).ToString
Next
ارجو التكرم بالتعديل على الكود علما بأن عدد الاسطر في التكس بوكس غير محدد