Hi all,
I have a custom form in my scheduler, and after one event is submitted, the recurrence editor does not reset. It holds, displays, and uses the previously entered recurrence data. What is the best way to manually achieve a recurrence editor reset? I couldn't find any information in the scheduler documentation about programatically editing the contents of the recurrence editor.
Thanks.
This is regarding an issue that we are facing with combo box column sorting , if we bind a string fields as “DatavalueField “ and do sorting on Combo box column Kendo grid binding is braking. But this works if we bind numeric field with DatavalueField and it sorts with this field. But in our case we need to sort by the field bound to DataTextField (which is in the UI). Please suggest possible solution or work around to address this issue.
Looking forward to hear from you soon - thanks in advance.
This is regarding an issue that we are facing with combo box column sorting , if we bind a string fields as “DatavalueField “ and do sorting on Combo box column Kendo grid binding is braking. But this works if we bind numeric field with DatavalueField and it sorts with this field. But in our case we need to sort by the field bound to DataTextField (which is in the UI). Please suggest possible solution or work around to address this issue.
Looking forward to hear from you soon - thanks in advance.
... schema: { type: "json", model: { id: "id", fields: { c_pmchart: {type: "string", validation: { required: true }}, defi: { type: "string", validation: { required: false }, defaultValue: function () {return 'test value';} },...I am using an Event Template that does not have the end datetime visible to the end user. The actual end datetime is calculated based on other dropdown selections made which give a duration for the task that is then added to the start datetime.
The event creation works fine but initially the event block only occupies the default slot for the view (e.g. 30mins for the day, week views). If I change the view (advance a day say) and then return back the block now correctly occupies the time slots associated with its start/end datetimes.
How can I get the scheduler to redraw the block when created?
when the scheduler is in "mobile" mode, e.g. the view selector goes from buttons to a single dropdown, whenever you click the dropdown, it calls my navigate and paramterMap function and calls the read api. Then when i select the new view it calls again. All calls have the correct date ranges.
how do i get stop the first call from occurring? e.g. it is making 2 calls every time. The second call is the correct call. The first call is essentially re-calling the initialization script or pulling in the same data it already has loaded.
code snippet
$("#scheduler").kendoScheduler({
toolbar: ["pdf"],
pdf: {
fileName: "My_School_Year_Calendar.pdf",
proxyURL: "//demos.telerik.com/kendo-ui/service/export"
},
startTime: today,
date: today,
timezone: "",
allDayEventTemplate: adTemplate,
eventTemplate: eTemplate,
views: [
{ type: "agenda", selected: true },
"day",
"week",
"month"
],
editable: false,
dataBound: scheduler_dataBound,
dataSource: {
transport: {
read: {
url: "@Url.Action("Calendar", "Homeroom")",
dataType: "json",
contentType: "application/json; charset=utf-8",
type: "POST"
},
parameterMap: function (options, operation) {
if (operation === "read") {
var scheduler = $("#scheduler").data("kendoScheduler");
var result = {
start: scheduler.view().startDate().toMsyString(),
end: scheduler.view().endDate().toMsyString()
};
return kendo.stringify(result);
}
return kendo.stringify(options);
}
},
serverFiltering: true,
schema: {
model: {
id: "taskID",
fields: {
classId: { from: "ClassId", type: "number" },
taskID: { from: "TaskID", type: "number" },
title: { from: "Title", defaultValue: "No title", validation: { required: true } },
start: { type: "date", from: "Start" },
end: { type: "date", from: "End" },
ownerId: { from: "StudentId", defaultValue: 1 },
isAllDay: { type: "boolean", from: "IsAllDay" }
}
}
}
},
filter: {
logic: "or",
filters: [
{ field: "ownerId", operator: "eq", value: 513 },
{ field: "ownerId", operator: "eq", value: 531 }
]
},
resources: [
{
field: "ownerId",
title: "Student",
dataSource: [
@Html.Raw(@Model.Sources.StudentResourceJs)
]
}
],
change: function (e) {
var start = e.start;
var end = e.end;
console.log(kendo.format("Selection between {0:g} and {1:g}", start, end));
},
navigate: function (e) {
console.log("navigate", e.date);
}
});
<div data-role="view" data-title="Control Panel - Mobile" id="listmessages" data-init="listMessagesInit"> <h2>Customer Messages</h2> <p><?php echo $unread_messages . ' - unread messages'; ?></p> <ul id="message_list"></ul> </div> <script id="message_list_template" type="text/x-kendo-template"><a href=""><div style="float:left; width:150px; height: 50px" class="isnew_#= isnew #">#= customer_name #<br />#= created #</div><div style="height: 50px"id="message_#= id #" class="isnew_#= isnew #">#= message #</div></a></script><script> function listMessagesInit(){ function short_text(id, message){ if (message.length > 100){ var shortText = jQuery.trim(message).substring(0, 100).split(" ").slice(0, -1).join(" ") + "..."; } else { var shortText = message; } $(id).text(shortText); } var dataSource = new kendo.data.DataSource({ transport: { read: "/messages/data", dataType: "json", update: { url: function() { var url = "/messages/markasread/" + id + "/" + read; return url; }, type: "POST", dataType: "json" }, destroy: { url: function() { //where id is a global variable var delurl = "/messages/delete/" + id; return delurl; }, type: "DELETE", dataType: "json" } }, schema: { model: { id: "id", fields: { created: { type: "string" }, message: { type: "string" }, //shortMessage: - how to call the short_text() function here? Is it possible?? customer_name: { type: "string" }, customer_telephone: { type: "string" }, ip: { type: "string" }, created: { type: "string" }, email: { type: "string" }, isnew: { type: "string" } } } } }); $("#message_list").kendoMobileListView({ dataSource: dataSource, //pullToRefresh: true, //appendOnRefresh: true, style: "inset", click: function(e) { var id = e.dataItem.id; var selected = dataSource.get(id); window.kendoMobileApplication.navigate("/messages/view/" + id); }, template: $("#message_list_template").text() }); } </script> <style> #listmessages div.isnew_1 {font-weight:bold} #listmessages div.isnew_0 {font-weight:normal} </style> I'm having an issue with the enabled binding of a button. It's bound to function on a view model (kendo.observable) that returns a Boolean value based on the values of properties on the same view model. The binding runs once, when bound, but never again after the properties of the view model have changed. Is there any way that I can get this binding to 'refresh' on property change? Code below:
var viewModel = kendo.observable({ userName: null, password: null, isEnabled: function () { var self = this; return self.userName != undefined && self.password != undefined; }});And the HTML:
<button class="k-button k-primary" data-bind="click: onClicked, enabled: isEnabled">Click</button>