DataManager and WebAPI

Hi, I am using Angular and MVC 6, and am confused about the DataManager queries.
I have added the DataManager to the ejAutoComplete text box with the following settings (in TypeScript, but nothing complicated)
var dataManager = new ej.DataManager({
                url: "api/Example/Get",
                adaptor: new ej.UrlAdaptor()
            });
            this.acOptions = {
                dataSource: dataManager,
                fields: {
                    text: "contactName"
                }
            };
When I start typing I get a query string like $select=contactName&$filter=startswith(tolower(contactName),%27per%20100%27)&$orderby=contactName
So my questions are:
What is this?
Where do I find the documentation on what the DataManager could possibly send to my Controller?
Is there a standard way to parse this query string so I know what to return back?


3 Replies

JK Jayaprakash Kamaraj Syncfusion Team March 14, 2016 10:14 AM UTC

Hi Quinn,
In DataManager we have used odataQueryoptions for perform server side operations(paging/filtering/sorting..etc) in webApiAdaptor . So, we have generated url with proper odata url conventions in client side to perform server side operation in Grid. Please refer to the below documentation.
Documentation for odataQueryoptions: http://www.asp.net/web-api/overview/odata-support-in-aspnet-web-api/supporting-odata-query-options
Documentation for url conventions OData V3 : http://www.odata.org/documentation/odata-version-3-0/url-conventions/
Documentation for url conventions OData V4: http://docs.oasis-open.org/odata/new-in-odata/v4.0/cn01/new-in-odata-v4.0-cn01.html#_Toc366145448
Regards,
Jayaprakash K.


QU Quinn March 14, 2016 09:45 PM UTC

Hi Jayaprakash,
Thanks for the info.


JK Jayaprakash Kamaraj Syncfusion Team March 15, 2016 05:12 AM UTC

Hi Quinn, 


We are happy that the provided suggestion helped you. 

Please get back to us if you need any further assistance.  


Regards, 


Jayaprakash K.


Loader.
Up arrow icon