Kendo Grid / JSDO / Not returning single table in multi-tabl

Posted by christian.bryan@capita.co.uk on 21-Aug-2018 05:45

Hi All 

I have a very simple Kendo Grid:

dataSource = new kendo.data.DataSource( {type: "jsdo",

serverPaging: true,

serverFiltering: true,
// filter: { field: "Country", operator: "eq", value: "USA" },
serverSorting: true,
// sort: { field: "State", dir: "desc" },
pageSize: 10,
transport: {
jsdo: "OEAA.Repairs.LocationListBusinessEntity",


tableRef: "eLocListEntries",


// viewTables can be used as a comma separated list to selectively fill
// child/grandchild tables of the tableRef specified above. By default
// if querying top level table in the dataset, all children are returned
// if querying a child table, only the child table will be returned. Can
// also use wildcards in the comma separated list e.g. eJob*
viewTables: "",
countFnName: "count"
},

The JSON returned is of the format:

{
"dsLocationList": {
"eLocList": [{
"OrgCode": "01",
"ClientCode": "",
"LocList": "PB",
"Description": "PB",
"NoOfLocations": 0,
"Inactive": false,
"CustomUIResponse": null,
"id": "01||PB",
"seq": null
}, {
"OrgCode": "01",
"ClientCode": "HSG",
"LocList": "BOIL",
"Description": "boiler scheme II",
"NoOfLocations": 2,
"Inactive": false,
"CustomUIResponse": null,
"id": "01|HSG|BOIL",
"seq": null,
"eLocListEntries": [{
"OrgCode": "01",
"ClientCode": "HSG",
"LocList": "BOIL",
"PlaceRef": "1000191",
"Address": "46 Stanhope Park Drive, Carlisle, Cumbria, CA1",
"LocationStatus": "O",
"LocationStatusDescription": "Occupied",
"LocationSubStatus": "OCC",
"LocationSubStatusDescription": "Occupied",
"JobAllowed": "Y",
"CustomUIResponse": null,
"id": "01|HSG|BOIL|1000191",
"seq": null
},

But the grid is empty.

Any ideas?

Thanks

All Replies

Posted by Mike Fechner on 21-Aug-2018 05:57

Your JSON is nested. And the first eLocList record does not have any child records. Does it work when the first eLocList record has child records?

Did you try without a nested relation?

Posted by christian.bryan@capita.co.uk on 21-Aug-2018 09:45

Hi Mike

This was developed using the CW framework and the UI was created using the BE entity designer.

See screenshots.

Shall i log a call for this.

Thanks

Posted by Mike Fechner on 21-Aug-2018 09:50

... that still leaves you the option to NOT use nested in the relations.

Posted by christian.bryan@capita.co.uk on 21-Aug-2018 10:08

Hi Mike

This seems to work with the JSDO 4.2 and OE 11.6.3 but not the JSDO 4.4 and OE 11.7.2.

Is this what you would expect.

Thanks

Posted by rnicoara on 21-Aug-2018 11:02

Hello,

I'm afraid that this is a known limitation of the JSDO. Our Angular components do offer a fix for this, however I am afraid that there is no known workaround for working with partial datasets using the JSDO directly.

Posted by Patrik Wikström on 21-Aug-2018 23:15

Not to use nested would probably work, but wouldn't it be nice to be able to have nested in relations and still be able to return the data from any level in the hierarchy? We have marked all our BE dataset relations as nested.

Posted by christian.bryan@capita.co.uk on 22-Aug-2018 03:14

How do you mark your relations as nested?

Posted by Mike Fechner on 22-Aug-2018 13:18

It’s a property on the relation.

This thread is closed