Esempio n. 1
0
        public static KendoGridSorterCollection BuildCollection(HttpRequestBase request)
        {
            var collection = BuildEmptyCollection();

            var idex = 0;
            while(true)
            {
                var sorter = new KendoGridSorter()
                {
                    Field = request.Params["sort[" + idex + "][field]"],
                    Direction = request.Params["sort[" + idex + "][dir]"] 
                };

                if (sorter.Field == null) { break; }
                collection.Sorters.Add(sorter);
                idex++;
            }

            return collection;
        }
Esempio n. 2
0
        public static KendoGridSorterCollection BuildCollection(HttpRequestBase request)
        {
            var collection = BuildEmptyCollection();

            var idex = 0;

            while (true)
            {
                var sorter = new KendoGridSorter()
                {
                    Field     = request.Params["sort[" + idex + "][field]"],
                    Direction = request.Params["sort[" + idex + "][dir]"]
                };

                if (sorter.Field == null)
                {
                    break;
                }
                collection.Sorters.Add(sorter);
                idex++;
            }

            return(collection);
        }