اذهب إلى المحتوى
  • 0

كيف أمرر صفوف من DataGridView إلى DataGridView أخرى على Vb.net؟

سعاد

السؤال

أحاول تمرير قيم الصفوف الموجودة على عنصر من نوع datagridview إلى عنصر آخر من نفس النوع، على تطبيق لـVb.net، وهذا هو الكود:

  • frm_1.vb:
Private Sub btn_purchase_Click(sender As System.Object, e As System.EventArgs) Handles btn_purchase.Click
      Dim newForm As New frm_2
      newForm.AllRows = grd_order.DataSource
      'what should i put here because the above line is wrong
      newForm.Show()
End Sub
  • frm_2.vb:

Public Class frm_2
      Public Property AllRows As DataGridViewSelectedRowCollection
      'I know that DataGridViewSelectedRowCollection is used for the specific row but what about all rows?

      Private Sub frm_2_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
      'grd_invoice.DataSource = PassText
      'what should i put here
      End Sub
End Class

مع العلم أن كل عنصر موجود بنافذة مستقلة عن الأخرى، فكيف ذلك؟

رابط هذا التعليق
شارك على الشبكات الإجتماعية

Recommended Posts

لا توجد أي إجابات على هذا السؤال بعد

انضم إلى النقاش

يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.

زائر
أجب على هذا السؤال...

×   لقد أضفت محتوى بخط أو تنسيق مختلف.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   جرى استعادة المحتوى السابق..   امسح المحرر

×   You cannot paste images directly. Upload or insert images from URL.

  • إعلانات

  • تابعنا على



×
×
  • أضف...