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

[Solved] Current Page of the grid

1 Answer 64 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.
Abhishek
Top achievements
Rank 1
Abhishek asked on 13 Dec 2011, 01:23 AM
Hi,

I have just started to use Teleric extensions for MVC.
When a user selects a new page, is there a way to pass the (new) selected page index to the action method, or fetch this information in the controller in any way.

Thanks,
Abhi..

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 13 Dec 2011, 09:59 AM
Hi Abhishek,

Yes it is possible to fetch this information from the "GridCommand". All you need is
  1. Add the GridAction attribute and pass the name of the Grid to it.
  2. Add new parameter in your action method's signature.
e.g.
[GridAction(GridName="YourGridName")]
        public ActionResult Index(GridCommand cmd)
{
    //...
The command object has a property called Page.
I hope this helps.


Greetings,
Petur Subev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Abhishek
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or