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

AutoComplete and Web API - getting object with information

1 Answer 184 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Jakub
Top achievements
Rank 2
Jakub asked on 29 Apr 2014, 09:11 AM
Hello,

I am using JavaScript implementation of AutoComplete that is wired directly onto Web API. I need to get the typed content of the textbox in the Web API. Is that any easy way how to serialize the object that is being passed from the JavaScript (probably OData object) to some class in C# in Web API? The object seems to contain filtering, paging etc.

I know that this is designed to be used with MVC but I need to make it work somehow with Web API.

Thank you,

Jakub

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 01 May 2014, 06:30 AM
Hello Jakub,

I would suggest you check our ServerFiltering demo, which shows how to bind to a OData service. The datasource is configured to use an "odata" type. Thus on filtering the datasource will send the filter information to the server in correct format (you can examine the payload of the requests made by the widget). Another option is to use the parameterMap option to translate the filter information to any format your service recognizes. 

Regards,
Georgi Krustev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
AutoComplete
Asked by
Jakub
Top achievements
Rank 2
Answers by
Georgi Krustev
Telerik team
Share this question
or