V.V
V.V

Reputation: 883

Call Controller's Action in MVC through jqgrid

I create the Button in jqgrid row by using the Formatter.

Now I try to call the Controller's Action method by the following way,

{

name: 'Save', index: 'Save', width: 100, sortable: false,

formatter: function (cellvalue, options, rowObject) {

return "input type='button' value='store' [email protected]("Action", "Controller") ";

}

}     

But,I cant able to call the action.How to solve This?

Upvotes: 0

Views: 1063

Answers (1)

Ehsan Sajjad
Ehsan Sajjad

Reputation: 62488

Change :

[email protected]("Action", "Controller")

to this:

onclick=location.href='@Url.Action("Action", "Controller")'

Upvotes: 1

Related Questions