[سؤال] مساعدة في نقل البيانات من DataGridView الى تكسات - نسخة قابلة للطباعة +- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb) +-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182) +--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183) +--- الموضوع : [سؤال] مساعدة في نقل البيانات من DataGridView الى تكسات (/showthread.php?tid=11074) الصفحات:
1
2
|
RE: مساعدة في نقل البيانات من DataGridView الى تكسات - سعود - 11-01-15 طيب اخي الكريم نفس ما وضعه الاخ alktab فقط انقل الكود من الزر الى حدث نقر شبيكة البيانات .. مع التحقق من رقم الصف لو كان صفر تنسخ للمجموعة الاولى ولو رقم واحد تنسخ للمجموعة الثانية وهكذا. RE: مساعدة في نقل البيانات من DataGridView الى تكسات - المستكاوي - 12-01-15 اخي الكريم سعود الصف يتكون من خمسة خانات وعند النقر على DataGridView ينقل جميع الخانات الى TEXTBOX1 و TEXTBOX2 و TEXTBOX3 و TEXTBOX4 وTEXTBOX5 وعند نقر الصف الثالي ينقل جميع الخانات الى نفس التكسات من TEXTBOX1 الى TEXTBOX5 انا ارغب عند النقر في الصف الثالي ينقل الخانات من TEXTBOX6 الى TEXTBOX 10 اعتذر عن عدم توضيح سؤالي وجزاك الله خير RE: مساعدة في نقل البيانات من DataGridView الى تكسات - sami2015 - 12-01-15 Private Sub DataGridView1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles DataGridView1.MouseUp If DataGridView1.SelectedRows.Count = 3 Then Dim r1 As DataGridViewRow = DataGridView1.SelectedRows(2) TextBox1.Text = r1.Cells(0).Value TextBox2.Text = r1.Cells(1).Value TextBox3.Text = r1.Cells(2).Value TextBox4.Text = r1.Cells(3).Value TextBox5.Text = r1.Cells(4).Value Dim r2 As DataGridViewRow = DataGridView1.SelectedRows(1) TextBox6.Text = r2.Cells(0).Value TextBox7.Text = r2.Cells(1).Value TextBox8.Text = r2.Cells(2).Value TextBox9.Text = r2.Cells(3).Value TextBox10.Text = r2.Cells(4).Value Dim r3 As DataGridViewRow = DataGridView1.SelectedRows(0) TextBox11.Text = r3.Cells(0).Value TextBox12.Text = r3.Cells(1).Value TextBox13.Text = r3.Cells(2).Value TextBox14.Text = r3.Cells(3).Value TextBox15.Text = r3.Cells(4).Value End If End Sub RE: مساعدة في نقل البيانات من DataGridView الى تكسات - المستكاوي - 13-01-15 اخي sami2015 الكريم بعد التحية الكود لم يعمل معي , اتمنى لو تعمل مثال يفي بالغرض مع الشكر مقدماً RE: مساعدة في نقل البيانات من DataGridView الى تكسات - sami2015 - 13-01-15 http://store2.up-00.com/2015-01/1421178868981.jpg RE: مساعدة في نقل البيانات من DataGridView الى تكسات - المستكاوي - 18-01-15 اشكرك اخي sami2015 وكثر الله من امثالك وإعتذر عن التأخير في الرد بسبب انشغالي الكود شغال تمام 100% ولاكني اطمع في المزيد حسب الصورة المرفقة RE: مساعدة في نقل البيانات من DataGridView الى تكسات - sami2015 - 18-01-15 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 RE: مساعدة في نقل البيانات من DataGridView الى تكسات - سعود - 18-01-15 اشكر الاخ sami فقد اعاد الحل عدة مرات الامر بسيط جدا http://www.youtube.com/watch?v=urHG2vURx0k RE: مساعدة في نقل البيانات من DataGridView الى تكسات - سعود - 19-01-15 اعتذر اخواني فلقد نسيت تشغيل زر المايك اثناء التسجيل |