Hello,
I am using Kendo 2013.1.514.340 with asp.net mvc.
I am sending the Json to the grid that is generated from the following data structure:
I have two entities, Parent and Child. A Parent can have n Children. In this case a single Parent has two Children.
I use NewtonSoft to serialize the Json with the following settings:
When I have the case of a single parent with a single child all works fine.
The following Json is generated for a single parent that has two children:
This leads to the following error:
I would really appreciate any about this issue!
Best regards
I am using Kendo 2013.1.514.340 with asp.net mvc.
I am sending the Json to the grid that is generated from the following data structure:
I have two entities, Parent and Child. A Parent can have n Children. In this case a single Parent has two Children.
I use NewtonSoft to serialize the Json with the following settings:
SerializerSettings =
new
JsonSerializerSettings
{
ContractResolver =
new
DefaultContractResolver
{
IgnoreSerializableAttribute =
true
,
IgnoreSerializableInterface =
true
},
PreserveReferencesHandling = PreserveReferencesHandling.Objects,
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
};
The following Json is generated for a single parent that has two children:
{
"$id"
:
"1"
,
"Data"
: [
{
"$id"
:
"2"
,
"Aktiv"
:
false
,
"AktualisiertAm"
:
"2013-05-16T11:05:20.273"
,
"AktualisiertVon"
:
"abascore"
,
"Bemerkung"
:
""
,
"Bezeichnung"
:
"Child"
,
"ErzeugtAm"
:
"2013-05-16T11:05:20.273"
,
"ErzeugtVon"
:
"abascore"
,
"Id"
:
"615cba40-7c17-4a98-9371-443310947b81"
,
"ParentId"
:
"c6113c45-bd23-44d3-bfa2-470f647adc75"
,
"Nr"
: 1,
"Rowverion"
:
"AAAAAAAAorQ="
,
"Sprache"
:
"de-de"
,
"Status"
: 0,
"Parent"
: {
"$id"
:
"3"
,
"Branche"
:
""
,
"MaAnzahl"
: 2,
"PoG"
: 1,
"UnternehmenGroesse"
: 0,
"Child"
: [
{
"$ref"
:
"2"
},
{
"$id"
:
"4"
,
"Aktiv"
:
false
,
"AktualisiertAm"
:
"2013-07-03T18:31:00.953"
,
"AktualisiertVon"
:
"abascore"
,
"Bemerkung"
:
""
,
"Bezeichnung"
:
"Child2"
,
"ErzeugtAm"
:
"2013-07-03T18:31:00.953"
,
"ErzeugtVon"
:
"abascore"
,
"Id"
:
"6662074d-2682-4c2d-a4fc-c01ae9eb7cfc"
,
"ParentId"
:
"c6113c45-bd23-44d3-bfa2-470f647adc75"
,
"Nr"
: 2,
"Rowverion"
:
"AAAAAAACOlE="
,
"Sprache"
:
"de-de"
,
"Status"
: 0,
"Parent"
: {
"$ref"
:
"3"
}
}
],
"AktualisiertAm"
:
"2013-05-16T11:05:05.333"
,
"AktualisiertVon"
:
"abascore"
,
"Bemerkung"
:
""
,
"Bezeichnung"
:
"Parent"
,
"Descriminator"
:
"MAND"
,
"Email"
:
"Parent@masdnad.asda"
,
"ErzeugtAm"
:
"2013-05-16T11:05:05.333"
,
"ErzeugtVon"
:
"abascore"
,
"Id"
:
"c6113c45-bd23-44d3-bfa2-470f647adc75"
,
"Logo"
:
""
,
"Mobil"
:
""
,
"Name0"
:
"Parent"
,
"Name1"
:
""
,
"Nr"
: 1,
"Ort"
:
"München"
,
"Plz"
:
"12345"
,
"Postfach"
:
""
,
"Rowverion"
:
"AAAAAAAAorI="
,
"SatzQuelle"
:
null
,
"Staat"
:
"Parentland"
,
"Strasse"
:
"Parentenstrasse"
,
"Telefon"
:
""
,
"Website"
:
""
,
"Ansprechpartners"
: []
}
},
{
"$ref"
:
"4"
}
],
"Total"
: 2,
"AggregateResults"
:
null
,
"Errors"
:
null
}
This leads to the following error:
Uncaught TypeError: Cannot read property
'Bezeichnung'
of undefined
(anonymous function)
T.extend._rowsHtml kendo.all.min.js:18
T.extend.refresh kendo.all.min.js:18
b.isFunction.i jquery.min.js:3
i.extend.trigger kendo.all.min.js:9
nt.extend._process kendo.all.min.js:11
nt.extend.success kendo.all.min.js:11
b.isFunction.i jquery.min.js:3
n.success kendo.all.min.js:11
c jquery.min.js:3
p.fireWith jquery.min.js:3
k jquery.min.js:5
r
I would really appreciate any about this issue!
Best regards