In multiselect control, when user click delete icons of a selected value , it should alert confirmation message and based on user input "Yes" , "No" it should delete the selection or cancel it.
I tried as below, it shows confirmation popup but is not waiting for user confirmation
$(".k-delete").click(function (e) {
//window.event.cancelBubble = true;
//e.stopPropagation();
currentSelection = s.value()
$("#dlgDeleteSecFromAnalyst").html("Are you sure you want to remove.. clicked.");
$("#dlgDeleteSecFromAnalyst").dialog("open");
})
I have a grid which i want to hide the columns when they are grouped and show them when are removed from our group panel. is there any other way than looping through all columns to show(commented code).
dataBound: function (e) {
// this function (event) runs when kendo grid gets new data that get bound
var gridDataSource = e.sender.dataSource;
if (gridDataSource.group().length > 0) {
// for (var i = 0; i < this.columns.length; i++) {
// grid.showColumn(i);
// }
Ember.$("div.k-group-indicator").each(function (i, v) {
e.sender.hideColumn($(v).data("field"));
});
//the grid is grouped
Ember.$(".grouping-collapser").css('display', 'block');
e.sender.element.find(".k-icon.k-i-collapse").trigger("click");
} else {
Ember.$(".grouping-collapser").css('display', 'none');
}
}
Hello all,
I am using the Kendo validator to validate a form using the required HTML 5 attribute. However there is a browser based "please fill out this field" message that is showing IN ADDITION to the kendo tooltip for validation. Is there a way to prevent the default browser one so the Kendo error is the only one shown?
Thanks.
I am using kendo diagram with visualTemplate
http://demos.telerik.com/kendo-ui/diagram/index
I need to write name with bold font
g.append(new dataviz.diagram.TextBlock({ text: textBlock.label, x: textBlock.x, y: textBlock.y, bold: true // <--- ???}));
I'm reading a sample JS object array and binding the information to the Kendo UI Grid as shown below
var sites = [{
sitename: "HTS_SITE_001",
address: "HTS Orion",
contact: "john.smith@telerik.com",
status: "70",
persons: "5"
},
{
sitename: "HTS_SITE_002",
address: "Smith",
contact: "john.smith@telerik.com",
status: "70"
},
{
sitename: "HTS_SITE_003",
address: "Smith",
contact: "john.smith@telerik.com",
status: "70"
},
{
sitename: "HTS_SITE_004",
address: "Smith",
contact: "john.smith@telerik.com",
status: "70"
}];
$("#grid").kendoGrid({
columns: [{ title: "Site Name", field: "sitename" },
{ title: "Site Address", field: "address"},
{ title: "Contact", field: "contact" },
{ title: "Status", field: "status" }],
pageable: true,
sortable: true,
navigatable: true,
dataSource: sites
});
However, the styling of the grid is not what I expect. I want to populate the data in the HTML table which has the pre-defined styling as shown below. How do I achieve this using Kendo Grid,
<div class="box-body">
<div class="table-responsive">
<table class="table no-margin">
<thead>
<tr>
<th data-field="sitename">Sites</th>
<th data-field="address">Address</th>
<th data-field="status">Status</th>
<th data-field="contact">Contact</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="pages/examples/invoice.html">HTS_SITE_001</a></td>
<td>#24, Pirmasenserstrasse</td>
<td>In progress</td>
<td>joe.simon@google.de</td>
</tr>
</tbody>
</table>
</div>
<!-- /.table-responsive -->
</div>
Hi,
I have created a custom template for adding events to the scheduler, and within this I have added 3 new fields, 2 drop downs and a text box. All 3 of the new fields are set as required. If I leave them blank and click save, the required validation message is shown for the new text field but not shown for the two drop down fields (see attached screen shot). How can I get the message to show for the drop downs (personnel & encounter)?
The html for my custom template is:
<div class="k-edit-label"><label for="personnel">Personnel Details</label></div><div data-container-for="personnel" class="k-edit-field"> <select class="diaryDropDown" id="personnel" data-bind="value:personnel" data-role="dropdownlist" required="required" data-value-field="value" data-text-field="text"> <option value="001">001: Bob Smith</option> <option value="002">002: John Smith</option> <option value="003">003: Mark Jones</option> <option value="004">004: Alan Evans</option> </select></div> <div class="k-edit-label"><label for="encounter">Encounter Type</label></div><div data-container-for="encounter" class="k-edit-field"> <select class="diaryDropDown" id="encounter" data-bind="value:encounter" data-role="dropdownlist" required="required" data-value-field="value" data-text-field="text"> <option value="1">Encounter A</option> <option value="2">Encounter B</option> <option value="3">Encounter C</option> <option value="4">Encounter D</option> </select></div><div class="k-edit-label"><label for="reason">Reason</label></div><div data-container-for="reason" class="k-edit-field"> <input type="text" class="k-input k-textbox" name="reason" required="required" data-bind="value:reason"></div><div class="k-edit-label"><label for="title">Title</label></div><div data-container-for="title" class="k-edit-field"> <input type="text" class="k-input k-textbox" name="title" required="required" data-bind="value:title"></div><div class="k-edit-label"> <label for="start">Start</label></div><div data-container-for="start" class="k-edit-field"> <input type="text" data-role="datetimepicker" data-interval="15" data-type="date" data-bind="value:start,invisible:IsAllDay" name="start" /> <input type="text" data-type="date" data-role="datepicker" data-bind="value:start,visible:isAllDay" name="Start" /> <span data-bind="text: startTimezone"></span> <span data-for="start" class="k-invalid-msg" style="display: none;"></span></div><div class="k-edit-label"><label for="end">End</label></div><div data-container-for="end" class="k-edit-field"> <input type="text" data-type="date" data-role="datetimepicker" data-interval="15"data-bind="value:end,invisible:isAllDay" name="end" data-datecompare-msg="End date should be greater than or equal to the start date" /> <input type="text" data-type="date" data-role="datepicker" data-bind="value:end,visible:isAllDay" name="end" data-datecompare-msg="End date should be greater than or equal to the start date" /> <span data-bind="text: endTimezone"></span> <span data-bind="text: startTimezone, invisible: endTimezone"></span> <span data-for="end" class="k-invalid-msg" style="display: none;"></span></div><div class="k-edit-label"><label for="isAllDay">All day event</label></div><div data-container-for="isAllDay" class="k-edit-field"> <input type="checkbox" name="isAllDay" data-type="boolean" data-bind="checked:isAllDay"></div><div class="k-edit-label"><label for="recurrenceRule">Repeat</label></div><div data-container-for="recurrenceRule" class="k-edit-field"> <div data-bind="value:recurrenceRule" name="recurrenceRule" data-role="recurrenceeditor"></div></div><div class="k-edit-label"><label for="description">Description</label></div><div data-container-for="description" class="k-edit-field"> <textarea name="description" class="k-textbox" data-bind="value:description"></textarea></div><div class="k-edit-label"><label for="clinicID">Clinic</label></div><div data-container-for="clinicID" class="k-edit-field"> <select id="clinicID" data-bind="value:clinicID" data-role="dropdownlist" required="required" data-value-field="value" data-text-field="text"> <option value="1">Clinic A</option> <option value="2">Clinic B</option> <option value="3">Clinic C</option> <option value="4">Clinic D</option> </select></div>
My scheduler is defined as:
$('#divDiaryCalendar').kendoScheduler({ date: new Date(commonFunctions.getSchedulerCurrentDate()), startTime: new Date(commonFunctions.getSchedulerCurrentDate() + " 08:00 AM"), endTime: new Date(commonFunctions.getSchedulerCurrentDate() + " 08:00 PM"), editable: { template: self.customTemplate(), }, dataSource: { batch: true, transport: { read: { url: commonFunctions.getAjaxBaseUrl() + '/Api/V1/diary/read', dataType: "json" }, create: { url: commonFunctions.getAjaxBaseUrl() + '/Api/V1/diary/create', dataType: "json" }, update: { url: commonFunctions.getAjaxBaseUrl() + '/Api/V1/diary/update', dataType: "json" }, destroy: { url: commonFunctions.getAjaxBaseUrl() + '/Api/V1/diary/destroy', dataType: "json" }, parameterMap: function(options, operation) { if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } } }, schema: { model: { id: "AppointmentID", fields: { AppointmentID: { from: "_id", type: "string" }, personnel: { from: "personnel", validation: { required: true } }, encounter: { from: "encounter", validation: { required: true } }, reason: { from: "reason", validation: { required: true } }, title: { from: "title", validation: { required: true } }, start: { type: "date", from: "start" }, end: { type: "date", from: "end" }, clinicID: { from: "clinicID" }, isAllDay: { type: "boolean", from: "isAllDay" }, startTimezone: { from: "startTimezone" }, endTimezone: { from: "endTimezone" }, description: { from: "description" }, recurrenceId: { from: "recurrenceID" }, recurrenceRule: { from: "recurrenceRule" }, recurrenceException: { from: "recurrenceException" } } } } }, group: { resources: ["Clinics"], orientation: "horizontal" }, resources: [ { name: "Clinics", field: "clinicID", title: "Clinic", dataSource: [ { text: "Clinic A", value: 1, color: "#f8a398" }, { text: "Clinic B", value: 2, color: "#51a0ed" }, { text: "Clinic C", value: 3, color: "#56ca85" }, { text: "Clinic D", value: 4, color: "yellow" } ] } ], majorTick: 30, minorTickCount: 3, height: "100%", footer: false, views: [ { type: "day", selected: true, dateHeaderTemplate: "<span>#=kendo.toString(date, 'ddd d MMM')#</span>" }, { type: "week", dateHeaderTemplate: "<span>#=kendo.toString(date, 'ddd d MMM')#</span>" }, "month", { type: "timeline", eventHeight: 30 }, "agenda" ], selectable: true})Regards,
Gary