Hello Everyone,
I am facing problem in implementing the kendo alert functionality.
In my page I am using kendo grid which is working perfectly. But when I am trying to use kendo alert, javascript error comes "kendo.alert is not a function". Below is a part of the code.
kendo.ui.progress($('#myGridDiv'), true);
$.ajax({
url: '<%=ResolveUrl("~/ReportDataService.asmx/GetReportData") %>',
data: "{'Office':'" + Office + "','Team':'" + Team + "','Client':'" + Client + "','FileNo':'" + FileNo + "','BillNo':'" + BillNo + "'}",
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
if (data.d.length > 0) {
var grid = $('#myGridDiv').getKendoGrid();
grid.dataSource.data(data.d);
grid.refresh();
}
else {
kendo.alert('No results found. Displaying last searched results.'); //--> Error comes from here. If no record is found for the grid.
}
kendo.ui.progress($('#myGridDiv'), false);
},
error: function (error) {
alert("Error: " + JSON.stringify(error));
kendo.ui.progress($('#myGridDiv'), false);
}
});
The scripts that I am using are
<link rel="stylesheet" href="Styles/kendo.common.min.css" />
<link rel="stylesheet" href="Styles/kendo.default.min.css" />
<link rel="stylesheet" href="Styles/kendo.default.mobile.min.css" />
<script src="Scripts/jquery.min.js"></script>
<script src="Scripts/jszip.min.js"></script>
<script src="Scripts/kendo.all.min.js"></script>
Can somebody please help.
Thanks & Regards
$(
'#refresh'
).button().click(
function
(){
$(
'body'
).prepend(
'refresh called.<br/>'
);
var
grid = $(
"#grid"
).data(
"kendoGrid"
);
grid.refresh();
});
function
changeColumns() {
var
headers =
new
Array();
$(
"#columns"
).children().each(
function
() {
if
($(
this
).attr(
"checked"
) ==
"checked"
) {
headers.push($(
this
).attr(
"id"
));
}
});
var
grid = $(
"#GridTest"
).data(
"kendoGrid"
);
var
ds = grid.dataSource;
grid.columns = [];
grid.thead.remove();
ds.data({
transport: {
read: {
url: controller +
"Test_Read"
,
dataType:
"json"
,
data: { headers: headers }
},
parameterMap:
function
(options) {
return
kendo.stringify(options);
},
type:
"json"
},
pageSize: 10,
serverPaging:
true
,
serverFiltering:
true
,
serverSorting:
true
});
$(
"#GridTest"
).kendoGrid({
dataSource: ds,
scrollable:
true
,
sortable:
true
,
reorderable:
true
,
resizable:
true
}).data(
"kendoGrid"
);
}
public
ActionResult Test_Read([DataSourceRequest] DataSourceRequest request,
object
headers =
null
)
{
return
Json(GetProductsDynamic(headers).ToDataSourceResult(request));
}
sort=&page=1&pageSize=10&group=&filter="
So it seems the data isn't being sent at all.
Hey.
Some of my grids have many columns. Is it possible to a-z sort columns before they are displayed in the column picker?
Best regards
Morten
Hi,
How can I get the moveEnd to wait until a promise is resolved before ending completing?
Currently I have the following:
moveEnd: function(e) {
if (!isEventValid(e.start, e.end)) {
e.preventDefault();
return false;
}
$.when(getAssistance(e.event, e.start, e.end))
.done(function() {
window.location = "/new-url";
}).
fail(function() {
// 1
e.preventDefault();
return false;
});
}
(I dont know how to get out of this editor)
My problem is that the 'moveEnd' completes before the promise is complete. If the Promise resolved and the user redirected, its a non-issue, but if the promise is rejected, the move needs to be prevented.
Please advise, Thanks,
Grant
Hey everyone,
We are currently trying out Kendo UI to see if it would fit our needs.
Spreadsheets are very important us, and we want to do something very specific with them.
We want to be able to merge multiple exported spreadsheets (output of saveJSON()), so that the first spreadsheet will be shown on top of the second spreadsheet, ...
We have looked through the developer documentation, but there does not seem to be a way to do it.
The problem is that there is no way to, in code, load/paste data at a specific row index.
If we were able to 'copy' and 'paste' in code, we might get somewhere, although that is still not ideal.
Use case: We want the user to create 'template' spreadsheets, which can later be combined in a single spreadsheet.
f.e.:
- User creates a 'header ' template spreadsheet with content like: Title, name, an image
- User creates a 'body' template spreadsheet specific information regarding ...
- User creates a new empty spreadsheet and loads the header template spreadsheet, and after that, the body spreadsheet.
- The header template will appear above the body spreadsheet.
If someone could help us with this, it would be very much appreciated.