What sort of data can be used for aps/Grid? How can I use specific data to be displayed in a grid?


You can use both aps/Store and aps/Memory to populate aps/Grid.

If you need to display only some of the resources you can create a Memory and fill it with needed data, here is an example that shows only domains that were not yet added into application.

// create a store to fill with all domains available for account
var allDomainsStore = new ResourceStore({
        target: "/aps/2/resources/",
        apsType: ""

// create a store to fill with domains that were added into application, they should not be displayed to the user in this view
var alreadyAddedDomainsStore = new ResourceStore({
        target: "/aps/2/resources/",
        apsType: ""

// comparing two stores
when(allDomainsStore.query(), function(allDomains) {
    when(alreadyAddedDomainsStore.query(), function(addedDomains) {
        var addedDomainsHash = {};
        for (var i = 0; i < addedDomains.length; i++) {
            addedItem = addedDomains[i];
            addedDomainsHash[] = true

        var domainList = [];
        for (var i = 0; i < allDomains.length; i++) {
            domain = allDomains[i];
            if (addedDomainsHash[]) {
            domainList.push({ id:, label:, value:});

        // domainList now contains a list of all domains that were not added into application yet
        domainList.sort(function(a, b) {return a.label >= b.label});

Then you can create a Memory from domainList:

var freeDomainList = new Memory({data: domainList, idProperty: "id"});

and use it for Grid:

store: freeDomainList

Internal content