views:

896

answers:

2

Hi, I am trying to find a way bind Grid view to a JSON.NET parsed Linq to Json object

simply am calling

JObject yrs = SearchData("");

then use one property to be bound to Grid view

GridView1.DataSource = yrs["businesses"].Children();

I cant find any resources for something like that

neither binding directly work nor using Children, and seems like I can not find it in the documentation.

appreciate your help

+2  A: 

I think I just needed to sleep :)

this is how it should go, if someone need that ,

        var bsn =from c in yrs["businesses"].Children() 
        select new { Title = (string)c["Title"] , Type = (string)c["Type"] };
        GridView1.DataSource = bsn;

if there are better ways please advice

Laith
A: 

Hello Lalith,

     Can you post the full code to bind the json data to the GridView?
engineerachu
the above is really all you need to do, after pulling the info from any API you are using
Laith
I've never tried. Can you send a sample of it?
engineerachu
is there a way to download the sample code, i am on the same boat :)
Abu Hamzah