This is a migrated thread and some comments may be shown as answers.

[Solved] Custom ajax binding and query string parameters

0 Answers 85 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sebastien
Top achievements
Rank 1
Sebastien asked on 10 Jan 2011, 02:21 PM
Hello

I have set up a page containing a MVC grid control; for this control I have configured custom Ajax binding.

I have the following action methods in my controller:
- Index: called when the page is loaded: the paged list of items to display is retrieved from the repository and returned to the view along with the total number of records
- AjaxBinding: called when the current page displayed in the grid is modifed, or when the sort or filter options are modified: in that case I query the repository again (with the chosen paging, sorting and filtering options) and I display the retrieved elements in the grid

This is working correctly; however I have noticed the following behavior:
Even if the Ajax binding is turned on, when I call the action method Index for this controller by passing the query string parameter page, this parameter is taken into account by the grid (even if the action method Index does not take it into account).

For example, when calling url http://mywebsite/Objects/Index?page=5 the query string parameter page (with value 5) is taken into account by the grid. Can the grid be configured to ignore these query string parameters ? (because we are using the Ajax binding mode there is no reason to take them into account)

Thanks a lot for your help
Tags
Grid
Asked by
Sebastien
Top achievements
Rank 1
Share this question
or