Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
Data Source JSON not working
posted

I am trying to display the data using very simple JSON data. but the data is not displaying. Below is the code

var data3 = '{"key":1,"firstName":"Bill","lastName":"Smith"}';
$("#grid1").igGrid({
//localSchemaTransform: false,
//dataSourceType: "jsonp",
features: [],
dataSourceType: "json",
dataSource: data3,
//autoGenerateColumns: true
});

Could you please do the needful help?

Thank you.

Parents
No Data
Reply
  • 1440
    posted

    Hello,

    thank you for contacting us. The datasource of the code is not correct, it shouldn't be in quotes and it should be defined as an array like this:

     var data3 = [{"key":1,"firstName":"Bill","lastName":"Smith"}];

    I also attach a sample for you reference. For additional questions don't hesitate to ask!

    Best regards,
    Yana Dimitrova
    Developer Support Engineer
    Infragistics, Inc.

    HtmlPage.rar
Children