Asp.net mvc 2 在按钮上呈现jquery网格单击asp.net mvc
我有一个页面,有两个日期字段和一个下拉列表。。。根据从这些字段中选择的值,我必须调用一个服务器方法,该方法获取数据,然后绑定网格。。如何使用jquery网格实现这一点。。。目前我知道我可以调用$(“#list”).jqGrid({});在函数内部的按钮上单击。。。但问题是我还想传递其他参数Asp.net mvc 2 在按钮上呈现jquery网格单击asp.net mvc,asp.net-mvc-2,jqgrid,Asp.net Mvc 2,Jqgrid,我有一个页面,有两个日期字段和一个下拉列表。。。根据从这些字段中选择的值,我必须调用一个服务器方法,该方法获取数据,然后绑定网格。。如何使用jquery网格实现这一点。。。目前我知道我可以调用$(“#list”).jqGrid({});在函数内部的按钮上单击。。。但问题是我还想传递其他参数 $(function() { $('#someButton').click(function() { // when the button is clicked //
$(function() {
$('#someButton').click(function() {
// when the button is clicked
// send an AJAX call to the server to fetch data:
$.ajax({
url: '/home/someaction',
data: {
// Use the data hash to send values to the server action
date1: $('#date1').val(),
date2: $('#date2').val(),
ddlValue: $('#ddl').val()
},
success: function(result) {
//TODO: setup jqGrid here based on the results
// returned from the server action
}
});
});
});