|
-
Jun 12th, 2020, 07:51 PM
#1
Thread Starter
Lively Member
[SOLVED!!] datagridview add rank number column then my data (pictures or text)
HELLO Everyone , so i am trapped with a problem. i can load a pictures or text but i can' t do a rank number column
for pictures i have this code:
Dim newItems() As String = ListBox2.Items.Cast(Of String).Select(Function(s) s.Split(" "c).Last & " " & s.Split(" "c).First).ToArray
For Each Item As String In ListBox2.Items
Dim imgx As Image
imgx = Image.FromFile(Application.StartupPath & "\DANfiles\challengersgif" & Item.Substring(Item.IndexOf(" ") + 1) & ".png")
DataGridView2.Rows.Add(imgx)
Next
for data, i have this code:
DataGridView1.DataSource = Enumerable.Range(1, newItems.Length).
Select(Function(n) New With {.Rank = n, .Name = newItems(n - 1)}).
ToArray()
now, i have two datagridview to display my data but i would like to merge the both in order to have this result in one datagridview:
rank image text
example
1 picture text
2 picture text
3 picture text
4 picture text
5 picture text
I miss me a clever codes to solve my problem definitively.
i beg your help for this. thank you in advance for your help
Last edited by danzey; Jun 13th, 2020 at 06:24 AM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|