That was just the basic data in which I send two variables to the server for the search. Below is an example of a json response.var group = $("#GroupCode");group.kendoAutoComplete({minLength:3,dataTextField: "Code",dataSource: {type: "json",transport: {read: {url: '@Url.Action("GroupCodeListBySG", "Equipment")',type: "GET",dataType: "json",data: {search: function() {return group.val();},saleGroup: function() {return $("#DivDrop option:selected").val();}}}}}});
[{"ExtensionData":{},"Code":"VEHICLES","DMFPercent":0,"Default_Excise_Tax":false,"Description":"VEHICLE ASSETS","Division":null,"IsActive":false,"IsAttachment":false,"JDUX_CatID":null,"JDUX_KeyCode":null,"RDOP_Agreement_MW":null,"RDOP_Agreement_NW":null,"RDOP_Agreement_SC":null,"RDOP_Agreement_SW":null,"RDOP_Facts_MW":null,"RDOP_Facts_NW":null,"RDOP_Facts_SC":null,"RDOP_Facts_SW":null,"Sales_Group":null,"Updated":"\/Date(-62135575200000)\/","Updated_By":null}]
<body>
<div id="example" class="k-content">
<div id="windowFacets" style="width:100%"></div>
<!-- // -->
<div id="grid"></div>
<div id="test"></div>
<script type="text/x-kendo-template" id="template">
<div class="toolbar">
<label class="category-label" for="category">joindate:</label>
<input id="start">
<input id="end">
<button class="k-button" onclick="refreshGrid()" id="refresh">search</button>
<button class="k-button" id="excel" onclick="excelGrid()" >excel</button>
</div>
</script>
<script>
function refreshGrid() {
$("#grid").data("kendoGrid").dataSource.read();
}
function excelGrid(){
var form = document.excel;
form.command.value = "admin03_excel";
form.start.value = $("#start").val();
form.end.value = $("#end").val();
form.action = "<%=RequestUtils.getPageLink(request,"/")%>ActAdmin.do";
form.submit();
}
$(document).ready(function() {
$("#grid").kendoGrid({
dataSource: {
transport: {
read: {
url: "/ActAdmin.do?command=admin03_json",
dataType: "json",
data: { //additional parameters sent to the remote service
start: function() {
return $("#start").val();
},
end: function() {
return $("#end").val();
}
}
}
},
schema: {
data: "rows",
total: "total",
model: {
fields: {
reg_date :{ type: "string" },
usr_id :{ type: "string" },
biz_name :{ type: "string" },
biz_num :{ type: "string" },
usr_name :{ type: "string" },
reg_date :{ type: "string" },
usr_hp :{ type: "string" }
}
}
},
pageSize: 15,
serverPaging: true,
serverSorting: true,
serverFiltering: true
},
height: 720,
filterable: true,
sortable: true,
pageable: true,
selectable: true,
toolbar: kendo.template($("#template").html()),
change: function(data){
var text = "";
var grid = this;
grid.select().each(function() {
var dataItem = grid.dataItem($(this));
text = dataItem.usr_id;
var window = $("#windowFacets");
window.kendoWindow({
actions: ["Close"],
width: "780px",
height: "620px",
content:{
url: "/ActAdmin.do?command=admin03_popup",
data:{usr_id: function() {return text;}}
},
modal: true,
title: "DetailView"
});
alert('3');
window.data("kendoWindow").open();
});
},
columns: [{
field:"reg_date",
title: "date",
filterable: false,
sortable: false
},
{
field: "usr_id",
title: "id"
},
{
field: "biz_name",
title: "iz",
sortable: false,
filtertable: false
},
{
field: "biz_num",
title: "num",
sortable: false
},
{
field: "usr_name",
title: "user",
filterable: false,
sortable: false
},
{
field: "usr_hp",
title: "phone",
filterable: false,
sortable: false
},
{
field: "reg_date",
title: "reg_date",
template: '#= kendo.toString(reg_date,"yyyy-MM-dd") #'
}
]
});
function startChange() {
var startDate = start.value();
if (startDate) {
startDate = new Date(startDate);
startDate.setDate(startDate.getDate() + 1);
end.min(startDate);
}
}
function endChange() {
var endDate = end.value();
if (endDate) {
endDate = new Date(endDate);
endDate.setDate(endDate.getDate() - 1);
start.max(endDate);
}
}
var start = $("#start").kendoDatePicker({
value: "<%=(st_year+"-"+st_month+"-"+st_day)%>",
change: startChange,
format: "yyyy-MM-dd"
}).data("kendoDatePicker");
var end = $("#end").kendoDatePicker({
value: new Date(),
change: endChange,
format: "yyyy-MM-dd"
}).data("kendoDatePicker");
start.max(end.value());
end.min(start.value());
});
</script>
</div>
@model Company.Domain.MVC.Models.ShipmentModel@using Kendo.Mvc.UI@{ Layout = "~/Views/Shared/_StandardLayout.cshtml"; ViewBag.Title = "Home";}<script type="text/javascript"> function QuoteItemGrid_ErrorHandler(e) { if (e.errors) { var message = "Errors:\n"; $.each(e.errors, function (key, value) { if ('errors' in value) { $.each(value.errors, function () { message += this + "\n"; }); } }); alert(message); } }</script><div id="ShipmentForm"> @(Html.Kendo().PanelBar() .Name("panelBar") .ExpandMode(PanelBarExpandMode.Single) .HtmlAttributes(new { style = "width:100%" }) .Items(panelBar => { panelBar.Add().Text("Shipment Items") .Expanded(true) .Content(@<div> @(Html.Kendo().Grid<Company.Domain.MVC.Models.ItemModel>() .Name("QuoteItemGrid") .Columns(columns => { columns.Bound(i => i.FreightClass).Width(50); columns.Bound(i => i.Length).Width(50); columns.Bound(i => i.Width).Width(50); columns.Bound(i => i.Height).Width(50); columns.Bound(i => i.DimensionUnitOfMeasure).Width(50); columns.Bound(i => i.QuantityValue).Width(50); columns.Bound(i => i.QuantityUnitOfMeasure).Width(50); columns.Bound(i => i.Weight).Width(50); columns.Bound(i => i.WeightUnitOfMeasure).Width(50); columns.Bound(i => i.NmfcCode).Width(50); columns.Bound(i => i.ItemDescription).Width(50); }) .ToolBar(toolbar => { toolbar.Create(); toolbar.Save(); }) .Editable(editable => editable.Mode(GridEditMode.InCell)) .Pageable() .Sortable() .Scrollable() .DataSource(dataSource => dataSource .Ajax() .Batch(true) .ServerOperation(false) .Events(events => events.Error("QuoteItemGrid_ErrorHandler")) .Model(model => model.Id(i => i.ItemID)) .Create(create => create.Action("CreateProducts", "Home")) .Read(read => read.Action("GetProducts", "Home")) .Update(update => update.Action("UpdateProducts", "Home")) .Destroy(destroy => destroy.Action("DeleteProducts", "Home")) ) ) </div>); panelBar.Add().Text("Services") .Content(@<div>Services here</div>); panelBar.Add().Text("Address Information") .Content(@<div style="margin-left:1%;"> HTML omitted for brevity </div>); panelBar.Add().Text("Miscellaneous") .Content(@<div> HTML omitted for brevity </div>); }) )</div><td><a class="k-link" href="#" data-value="2012/7/14" title="Tuesday, August 14, 2012">14</a></td><td class=""><a class="k-link" href="#" data-value="2012/6/10" title="Tuesday, July 10, 2012"> <div title="" class="selectedDate">10</div></a></td>