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

ODATA Grid Datasource with POST and parameters

4 Answers 479 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Ondřej
Top achievements
Rank 1
Ondřej asked on 04 Jan 2012, 03:17 PM
Hi,

we want to get datasource for grid through ODATA service operation using POST while passing additional arguments.
We are using .NET WCF DataService.
ServiceOperation itself works as well, but parameter is not passed (is always null) and request is always perfomed with GET.
We tried trial version as like as GPL, nothing works as supposed.

Please can you clarify correct using of data parameters passing to service operations using POST?
Thx

JS code:
$("#grid").kendoGrid({
dataSource: {
type: "odata",
serverPaging: true,
serverSorting: true,
pageSize: 10,
transport: {
read: 
{
type:"POST",
contentType: "application/json; charset=utf-8",
url:"http://localhost/Flexica_ODATA/product.svc/GetSamples",
datatype:"JSON",
data: { param: "testx" }
},
}
},
serverPaging: true,
height: 280,
pageable: true,
sortable: true,
columns: ["ProductName", "ProductCode"]
});

4 Answers, 1 is accepted

Sort by
0
Karl
Top achievements
Rank 1
answered on 05 Jan 2012, 11:44 AM
Hi, this is the same problem I was facing here.

As soon as you set "type: odata" no additional parameters are passed. This should be fixed, at least an explanation of this behaviour is very welcome.
0
Atanas Korchev
Telerik team
answered on 05 Jan 2012, 03:04 PM
Hi,

 I confirm this is a bug. OData datasource ignores user provided arguments. The problem should be addressed in the attached files (use either kendo.all.min.js or kendo.data.odata.min.js depending on your setup).

All the best,
Atanas Korchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Christian
Top achievements
Rank 1
answered on 20 Jan 2012, 11:50 AM
I've the same problem, but I need the NOT minified source version, because I've customized the script to work with SP2010 ListData.svc.#
Bye,

Christian
0
Karl
Top achievements
Rank 1
answered on 20 Jan 2012, 12:48 PM
Thanks Atanas, I'll try it...

Heiko
the Heiko team :-)
Tags
Data Source
Asked by
Ondřej
Top achievements
Rank 1
Answers by
Karl
Top achievements
Rank 1
Atanas Korchev
Telerik team
Christian
Top achievements
Rank 1
Share this question
or