I´m trying to make things work with jTable but the listaction is not firing the POST action in the Controller...
SCRIPT
$('#gridviewField').jtable({
title: 'The User List',
actions: {
listAction: '/Customer/UserList'
},
fields: {
Id: {
key: true,
create: false,
edit: false,
list: false
},
customerId: {
title: 'Customer Id',
list: false
},
Name: {
title: 'Name',
width: '15%'
},
Username: {
title: 'Username',
width: '15%'
},
EmailAddress: {
title: 'Email address',
width: '15%'
}
}
});
Controller
<HttpPost()> _
Public Function UserList() As JsonResult
Try
Dim users = _model.Users
Return Json(New With {.Result = "OK", .Records = users})
Catch ex As Exception
Return Json(New With {.Result = "ERROR", .Message = ex.Message})
End Try
End Function
Does jTable work with MVC 2? It should be working like this..
Thanks
It seems I had to put the script code in the aspx file. It's working now.