-1

kendoUIからqueryStringを取得します。

[0] "take"  string
[1] "skip"  string
[2] "page"  string
[3] "pageSize"  string
[4] "filter[logic]" string
[5] "filter[filters][0][value]" string
[6] "filter[filters][0][operator]"  string
[7] "filter[filters][0][field]" string
[8] "filter[filters][0][ignoreCase]"    string

モデルでこのバインディングはどのようになりますか?

非常に興味がありますfilter[filters][0] [value]

4

1 に答える 1

1

http://www.itq.nl/blogs/post/Kendo-UI-Grid-with-server-paging-filtering-and-sorting-(with-MVC3).aspxこれは私の問題の解決策です

モデル:

public class SortDescription
    {
        public string field { get; set; }
        public string dir { get; set; }
    }

public class FilterContainer
    {
        public List<FilterDescription> filters { get; set; }
        public string logic { get; set; }
    }

public class FilterDescription
    {
        public string @operator { get; set; }
        public string field { get; set; }
        public string value { get; set; }
    }

情報源:

dataSource: {
                type: "json",
                serverPaging: true,
                serverSorting: true,
                serverFiltering: true,
                allowUnsort: true,
                pageSize: 10,
                transport: { 
                    read: { 
                        url: "Export/PagedData",
                        type: "POST",
                        dataType: "json",
                        contentType: "application/json; charset=utf-8"
                    },
                    parameterMap: function(options) {
                        return JSON.stringify(options);
                    }
                },
                schema: { data: "Items", total: "TotalItemCount" }
            },
于 2013-02-04T11:53:23.573 に答える