This is a migrated thread and some comments may be shown as answers.

Schema model fieldname.from not respected

1 Answer 52 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Vincent
Top achievements
Rank 1
Vincent asked on 15 Sep 2013, 12:49 AM
Hi,

I am using a kendo Mobile listview with endless scrolling turned on.
My datasource schema model looks like this (Notice the "from" converting the server side "Title" to client side "title"):

1.fields:
2.            {
3.                title: { type: "string", from: "Title" },
my sort field is defined like this:
sort: [{ field: "title", dir: "desc"}],

I use odata and perform some parameter mapping like so:

parameterMap: function (parameters, type) {
                        var params = kendo.data.transports["odata"].parameterMap(parameters, type);
                        if (type == "read") {
                            params.format = "json";
                            params.$expand = allOptions.expand.join(',');
                            params.$select = allOptions.select.join(',');
                            params.page = parameters.page;
                            params.skip = parameters.skip;
                            params.take = parameters.take;
                            params.pageSize = parameters.pageSize;
                        }
                        return params;
                    }
During the  first request, the order field name is "Title" as it should be, however, loading the subsequent pages (endless scrolling), the order parameter is passed in as "title" and fails the request.

Is this a bug or misconfiguration?

Thanks, Vincent

1 Answer, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 16 Sep 2013, 08:20 AM
Hello Vincent,

Indeed you are right. This incorrect behavior. We will do our best to address this behavior for the upcoming service pack release. 

As a token of gratitude for bringing the problem to our attention I've updated your Telerik points.

Regards,
Nikolay Rusev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Data Source
Asked by
Vincent
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or