0

As I have learned the tutorial about dgrid(a new dojo grid),I have learned the example code.
Let me pick one to list here:

require(["dgrid/Grid", "dojo/domReady!"], function(Grid){
var data = [
    { first: "Bob", last: "Barker", age: 89 },
    { first: "Vanna", last: "White", age: 55 },
    { first: "Pat", last: "Sajak", age: 65 }
];

var grid = new Grid({
    columns: {
        first: "First Name",
        last: "Last Name",
        age: "Age"
    }
}, "grid");
grid.renderArray(data);
});

I Just want to know if we can displaying data from Ajax data source. How to implement it.

andyqee
  • 3,175
  • 3
  • 21
  • 24

1 Answers1

2

Use dgrid/OnDemandGrid together with dojo/store/JsonRest or dojo/store/Memory.

You can find a working example in my answer to Is it possible to filter data in a dgrid like you can in a datagrid?: http://jsfiddle.net/phusick/7gnFd/

Community
  • 1
  • 1
phusick
  • 7,342
  • 1
  • 21
  • 26