5 Answers, 1 is accepted
0
Hello Don,
Using DataSource filter API will generate the correct filter expression for OData services. If you build them manually here is the corresponding URI convention for OData v2 http://www.odata.org/documentation/uri-conventions#FilterSystemQueryOption
Regards,
Nikolay Rusev
the Telerik team
Using DataSource filter API will generate the correct filter expression for OData services. If you build them manually here is the corresponding URI convention for OData v2 http://www.odata.org/documentation/uri-conventions#FilterSystemQueryOption
Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Don
Top achievements
Rank 2
answered on 23 Jul 2012, 07:44 PM
How would this work with AutoComplete since the value must be provided in the filter:
HTML
<div data-role="view" id="home" data-title="my AutoComplete">
<div class="Container">
<input id="searchInput" data-role="autocomplete" />
</div>
</div>
JAVASCRIPT
$(function() {
$("#searchInput").kendoAutoComplete({
minLength:1,
dataTextField:'CustomerName',
dataSource: new kendo.data.DataSource({
type:'GET',
dataType:'odata',
transport:{
read: DataServiceURL + "Customers"
},
filters: { field: "CustomerName", operator: "startswith", value: "X" }
})
})
};
HTML
<div data-role="view" id="home" data-title="my AutoComplete">
<div class="Container">
<input id="searchInput" data-role="autocomplete" />
</div>
</div>
JAVASCRIPT
$(function() {
$("#searchInput").kendoAutoComplete({
minLength:1,
dataTextField:'CustomerName',
dataSource: new kendo.data.DataSource({
type:'GET',
dataType:'odata',
transport:{
read: DataServiceURL + "Customers"
},
filters: { field: "CustomerName", operator: "startswith", value: "X" }
})
})
};
0
Hello Don,
The AutoComplete widget will automatically request the DataSource with startswith filter applied.
Greetings,
Nikolay Rusev
the Telerik team
The AutoComplete widget will automatically request the DataSource with startswith filter applied.
Greetings,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Don
Top achievements
Rank 2
answered on 26 Jul 2012, 06:47 PM
I just cant seem to get any data back period.
I have yet to successfully pull any data using the Kendo transport object.
perhaps you could help with this and point out the error of my ways.
Here is a jsFidlle that attempts to populate a (data) grid using oData feed.
link is: http://jsfiddle.net/theDon911/X8CFk/
any help would be truely appreciated.
I will continue to scour the forums.
Thanks-
Don
I have yet to successfully pull any data using the Kendo transport object.
perhaps you could help with this and point out the error of my ways.
Here is a jsFidlle that attempts to populate a (data) grid using oData feed.
link is: http://jsfiddle.net/theDon911/X8CFk/
any help would be truely appreciated.
I will continue to scour the forums.
Thanks-
Don
0
Hello Don,
In case of OData binding you do not need to set dataType to read setting, but rather set type: "odata" as first level option of the DataSource. As in the fiddle: http://jsfiddle.net/Q4txb/
Secondly requesting the service returns returns an server error. One of the reasons might be if the service uses OData version 1 which doesn't have support for '$' parameters. You can find runnable example of using OData on the following code library: https://github.com/telerik/kendo-examples-asp-net/tree/master/grid-odata-crud
All the best,
Nikolay Rusev
the Telerik team
In case of OData binding you do not need to set dataType to read setting, but rather set type: "odata" as first level option of the DataSource. As in the fiddle: http://jsfiddle.net/Q4txb/
Secondly requesting the service returns returns an server error. One of the reasons might be if the service uses OData version 1 which doesn't have support for '$' parameters. You can find runnable example of using OData on the following code library: https://github.com/telerik/kendo-examples-asp-net/tree/master/grid-odata-crud
All the best,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!