954,514 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

JSON Data Manipulation Problem

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.16KB ss2.png 53.34KB
dashawk
Light Poster
31 posts since Jul 2011
Reputation Points: 13
Solved Threads: 3
 

anyone have an idea about this?

dashawk
Light Poster
31 posts since Jul 2011
Reputation Points: 13
Solved Threads: 3
 

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?

hericles
Practically a Posting Shark
823 posts since Nov 2007
Reputation Points: 136
Solved Threads: 167
 

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

dashawk
Light Poster
31 posts since Jul 2011
Reputation Points: 13
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: