kendu ui datasource read event has null request

自作多情 提交于 2019-12-11 04:26:04

问题


I have an Kendo UI scheduler widget on mobile page, which as you can see has a datasource read event.

    $("#scheduler").kendoScheduler({
    ...
    dataSource: {
        batch: true,
        transport: {
            read: {
            url: "http://mydomain.com/api/Schedule/Tasks_Read",
            dataType: "jsonp"
            },
...
});

When the read event is called it sends the request as

http://mydomain.com/api/Schedule/Tasks_Read?callback=jQuery1910528280699858442_1396259085815&_=1396259085816

the problem is that when the webapi get method gets the request, the [DataSourceRequest]DataSourceRequest request parameter is null.

[HttpGet]
        public DataSourceResult Tasks_Read(
            [DataSourceRequest]DataSourceRequest request)
        //,DateTime startDate)
        {
            using (scApp = new ScheduleControllerApplication())
            {
...
}
}

Can somebody clue me into why the request parameter is null?

I have a scheduler on a MVC4 page and it works fine and has the same querystring jquery addition.

MY SOLUTION - By no means let this stop you from answering if you have diferent approach. Being that this call was from a mobile source i changed the httpget signature

[HttpGet]
        public string Tasks_Read(
            string request)
        {
            using (scApp = new ScheduleControllerApplication())
            {
...
}
}

and it worked and returned the 2 jQuery items i was expecting.

来源:https://stackoverflow.com/questions/22758815/kendu-ui-datasource-read-event-has-null-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!