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

[Solved] returning ViewModel object in Ajax Action method in Custom binding

0 Answers 73 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.
Ramakrishna
Top achievements
Rank 1
Ramakrishna asked on 13 Feb 2012, 01:36 PM
Hi, Please let me know how I can pass a viewModel object to the Telerik MVC grid when binding the grid first time and also when switching between pages. the action method for the Ajax call expects a "GridModel" obejct, so I am not sure how I can pass a ViewModel object to it which contains additional context data including the actual data to bind to the grid. do you have a sample for this (the code in the following link works, but I want to pass viewModel instead of the data alone both in the index action method and also in the ajax action method)? Thanks in advance

http://demos.telerik.com/aspnet-mvc/razor/grid/custombinding
Tags
Grid
Asked by
Ramakrishna
Top achievements
Rank 1
Share this question
or