0

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

1 Answer 1

2

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.