03-07-22, 04:28 PM
السلام عليكم ورحمة الله وبركاته
عندي قائمة List وداخلها قاموس هل يوجد طريقة لعرضها داخل Datagridview او Listview?
هذا مثال :
كيف اعرض هذا Object داخل Datagridview ?
ويكون العرض هكذا
عندي قائمة List وداخلها قاموس هل يوجد طريقة لعرضها داخل Datagridview او Listview?
هذا مثال :
كود :
Public Class Profile
Property Name As String
Property isWork As Boolean
Property Informations As New Dictionary(Of String, String)
End Classكود :
Dim ProfileList As New List(Of Profile)
Dim p1 As New Profile
p1.Name = "Omar"
p1.isWork = True
p1.Informations.Add("Address", "KSA")
p1.Informations.Add("Age", "23")
p1.Informations.Add("Phone", "09485433")
Dim p2 As New Profile
p2.Name = "Samy"
p2.isWork = False
p2.Informations.Add("Address", "Egypt")
p2.Informations.Add("Age", "22")
p2.Informations.Add("Phone", "0665573")
Dim p3 As New Profile
p3.Name = "Ahmad"
p3.isWork = True
p3.Informations.Add("Address", "Morocco")
p3.Informations.Add("Age", "24")
p3.Informations.Add("Phone", "6565573")
Dim p4 As New Profile
p4.Name = "Amar"
p4.isWork = False
p4.Informations.Add("Address", "Jordan")
p4.Informations.Add("Age", "25")
p4.Informations.Add("Phone", "6565573")
ProfileList.Add(p1)
ProfileList.Add(p2)
ProfileList.Add(p3)
ProfileList.Add(p4)ويكون العرض هكذا
كود :
Name isWork Key Value
Amar False Address Jordan
Amar False Age 25
Amar False Phone 6565573
Ahmad True Address Morocco
Ahmad True Age 24
Ahmad True Phone 6565573
etc..