0

Hi guys, I have a project that reads a json data and parse it. The program is working properly except that I cannot get its individual rows and view it in separate panels.

Here is my code:

Imports System.Net.Json

Public Class Form2

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim parser As New JsonTextParser
        Dim o As JsonObject = parser.Parse(TextBox1.Text)

        'This will segregate the data from o
        For Each f As JsonObjectCollection In o.GetValue
            With lv
                .Items.Add(f.Item("id").GetValue.ToString)
                With .Items(.Items.Count - 1).SubItems
                    .Add(f.Item("fname").GetValue.ToString)
                    .Add(f.Item("lname").GetValue.ToString)
                    .Add(f.Item("address").GetValue.ToString)
                End With
            End With
        Next
    End Sub
End Class

I am using System.Net.Json here which can be found here.
Download and install it and add it as reference in your project.

My problem is that, I want to display each record in a separate panel view. See screen shot attachment for a clear detail..

Hope anyone could help me achieve what i want to do.

Thanks

Attachments ss1.png 30.16 KB ss2.png 53.34 KB
2
Contributors
3
Replies
4
Views
5 Years
Discussion Span
Last Post by dashawk
0

It looks like you are correctly accessing the JSON code as the data is appearing in your list view. Is your issue how to pass the data to another form?

0

yeah well my code works just fine. but the issue is that, i want to distribute each data to each individual panel... please see the attached screenshot for a better view of what i am referring to...

thanks

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.