Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7642065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:05:42+00:00 2026-05-31T09:05:42+00:00

I am using the Telerk Kendo UI grid that loads data remotely. The QueryString

  • 0

I am using the Telerk Kendo UI grid that loads data remotely. The QueryString passed into my action method looks like this:-

take=10&skip=0&page=1&pageSize=10&sort[0][field]=value&sort[0][dir]=asc

I am trying to work out how to bind the sort parameter into my method? Is it possible or do I need to enumerate through the QueryString collection manually or create a custom binder?

So far I have tried this:-

public JsonResult GetAllContent(int page, int take, int pageSize, string[] sort)

public JsonResult GetAllContent(int page, int take, int pageSize, string sort)

but sort is always null. Does anyone know how I can achieve this?

I can fall back to Request.QueryString using, but this is a bit of a kludge.

var field = Request.QueryString["sort[0][field]"];
var dir = Request.QueryString["sort[0][dir]"];
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T09:05:43+00:00Added an answer on May 31, 2026 at 9:05 am

    You could use an array of dictionaries:

    public ActionResult Index(
        int page, int take, int pageSize, IDictionary<string, string>[] sort
    )
    {
        sort[0]["field"] will equal "value"
        sort[0]["dir"] will equal "asc"
        ...
    }
    

    and then define a custom model binder:

    public class SortViewModelBinder : IModelBinder
    {
        public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)
        {
            var modelName = bindingContext.ModelName;
            var keys = controllerContext
                .HttpContext
                .Request
                .Params
                .Keys
                .OfType<string>()
                .Where(key => key.StartsWith(modelName));
    
            var result = new Dictionary<string, string>();
            foreach (var key in keys)
            {
                var val = bindingContext.ValueProvider.GetValue(key);
                result[key.Replace(modelName, "").Replace("[", "").Replace("]", "")] = val.AttemptedValue;
            }
    
            return result;
        }
    }
    

    which will be registered in Global.asax:

    ModelBinders.Binders.Add(typeof(IDictionary<string, string>), new SortViewModelBinder());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grid that is currently using Telerik Grids, I would like to
In web application[asp.net], i am using telerik grid control, i am bind the data
I'm using telerik mvc grid and bound my columns throuugh Data Table, I having
Hai am using telerik wpf grid in grid selection change event am getting the
I'm using the Telerik RAD Controls RADEditor/WYSIWYG control as part of a Dynamic Data
I am using Telerik MVC grid ajax binding to show some records. While the
I am using telerik RadGridView control. I would like to control/style the colors of
I am using Telerik asp.net mvc extensions. I have an issue that happens only
How do you like to arrange your using xxx imports in C#? I got
I am using Telerik MVC Grid, with ajax binding and I use grid editing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.