In this post from Jan 2013, staff said Kendo wasn't handling field names with a dot or a space because it would involve "extra overhead which is not needed in most cases".
This is kind of weird as many SQL statements has to return field with dots.
Two months later, Kendo staff posted a workaround available in Kendo Q1 2013.
I just tried the work around on a grid connected on a remote OData service and I think there's a problem with the getters generated for properties with dots. Indeed, when I receive data for the grid for a field named 'MyTable.MyField', the following error is raised: "TypeError: Cannot read property 'MyField' of undefined".
As explained in the solution poster in march 2013, I did set the column field name to "[\"MyTable.MyFieldName\"]". I was expecting a getter like this one:
but after a little investigation, I found that the exception was raised because the getter wasn't generated correctly:
I've been able to confirm the issue by changing the getter function from
to this one (not perfect.... this was to confirm if I was right about the bug)
Can you please confirm if I'm right about the bug (and if it will be fixed)?
Best regards,
Simon
This is kind of weird as many SQL statements has to return field with dots.
Two months later, Kendo staff posted a workaround available in Kendo Q1 2013.
I just tried the work around on a grid connected on a remote OData service and I think there's a problem with the getters generated for properties with dots. Indeed, when I receive data for the grid for a field named 'MyTable.MyField', the following error is raised: "TypeError: Cannot read property 'MyField' of undefined".
As explained in the solution poster in march 2013, I did set the column field name to "[\"MyTable.MyFieldName\"]". I was expecting a getter like this one:
return
d[
"MyTable.MyField"
];
but after a little investigation, I found that the exception was raised because the getter wasn't generated correctly:
return
d.MyTable.MyField;
I've been able to confirm the issue by changing the getter function from
getter:
function
(expression, safe) {
return
getterCache[expression] = getterCache[expression] ||
new
Function(
"d"
,
"return "
+ kendo.expr(expression, safe));
},
to this one (not perfect.... this was to confirm if I was right about the bug)
getter:
function
(expression, safe) {
return
getterCache[expression] = getterCache[expression] ||
new
Function(
"d"
,
"return d[\""
+ expression +
"\"]"
);
},
Can you please confirm if I'm right about the bug (and if it will be fixed)?
Best regards,
Simon