or
listView = $('#favorites-list').data('kendoListView')listView.refresh()<script type="text/javascript"> $(document).ready(function () { //Refresh the grid if the customer presses the submit button $('#submit').click(function () { Execute(); // this does not refresh the grid }); // create DatePicker from input HTML element $("#fromDate").kendoDatePicker(); $("#toDate").kendoDatePicker(); //Load the grid initially using the default date parameters Execute(); // this works }); var fromDate; var toDate; function Execute() { fromDate = $("#fromDate")[0].value; toDate = $("#toDate")[0].value; var element = $("#grid").kendoGrid({ dataSource: { type: "json", transport: { read: { url: "Tests/Tests?fromDate=" + fromDate + "&toDate=" + toDate, dataType: "json"} }, pageSize: 5, serverPaging: true, serverSorting: true }, height: 450, sortable: true, pageable: true, detailTemplate: kendo.template($("#template").html()), detailInit: detailInit, dataBound: function () { this.expandRow(this.tbody.find("tr.k-master-row").first()); }, columns: [ { field: "TestOne", title: "Test One" }, { field: "TestTwo", title: "Test Two" } ] }); }function detailInit(e) { var detailRow = e.detailRow; detailRow.find(".tabstrip").kendoTabStrip(); detailRow.find(".details").kendoGrid({ dataSource: { type: "json", serverPaging: true, pageSize: 5, transport: { read: { url: "Tests/TestDetail", dataType: "json"} }, }, height: 200, columns: [ { field: "DisplayDate", title: "Date" }, { field: "Type", title: "Text" } ] }); }
$.ajax({ url: 'REST/Alert', type: 'POST', data: _alertModel.toJSON(), timeout: 5000, dataType: 'json',var date = _alertModel.IncidentDate; _alertModel.IncidentDate = (date.getMonth() + 1) + "/" + date.getDate() + '/' + date.getFullYear(); $.ajax(...); _alertModel.IncidentDate = date;