We are using the kendoGrid detailTemplate to display a sub grid of data. This is working well.
However, the first column in the grid that contains the right pointer icon has a wide width. the online examples show a narrow width.
How can we control the width of the first column that contains the right pointer icon?
$("#mygrid-grid").kendoGrid({ ..... detailTemplate: kendo.template($("#template-details").html()), detailInit: detailInit, .... columns: [ { field: "eventStart", title: "Event Start", format: "{0:MM/dd/yyyy}", width: "6%" }, ......
See the attached screenshot and dojo link. How do I show the values as percentages of the total? For some reason, the chart is starting with 97% rather than 0%.
I want button add title tag. "data refresh".
How can I make it simple?
Thank you.
Hi, I want to show the time slot time under the cursor as you move about the scheduler. Similar to attached gif:
The problem is that when I navigate to a different day I can't re-bind the mouse move event. My code looks as follows, any help would be greatly appreciated.
Navigate:
EnableTimeTracking:
Thanks...
Hi,
I'm working with an older version of kendo elements. Currently I'm struggling with an tooltip. My Dropdown List shows additional information. However, when the selection changes, the old and new tooltip is displayed. Attached I have three screemshots, additional information (showing the first display of the tooltip), default tooltip (when there is no additional information) and additional information and default tooltip (after the defautl is displayed and a new item is selected). How can I make it to show only the current tooltip?
Here is my code for the tooltip:
$("#myElement").change(function(){
$("#myElement").kendoTooltip({
filter: ".k-input",
position: "top",
showAfter: 500,
content: function(e){
const dropdownlist = $("#myDdl").data("kendoDropDownList");
const selectedItem = dropdownlist.dataItem();
if (selectedItem.field2 === undefined) {
selectedItem.field2 = "This is the default tooltip";
}
const result = $("<div style='text-align: center';></div>").text(selectedItem.field2).css("width",
(selectedItem.field2.length * .6) + "em");
return result;
}
}).data("kendoTooltip");
});
I have a combobox that gets populated with a datasource. How can I disable a single item in the combobox based on the value of a different form field? For example, the combobox has 5 items, A, B, C, D, and E and they are all active. There is a form field called letterDoc and if letterDoc has a value of 8, I want to disable item A.
Is this possible?
Thank you.
I have a simple grid, with one command button. I'm trying to use the code that is show in your documentation to hide the command button conditionally, based on the data in the grid. However either the "visible" property has no effect, or an error is generated in the console.
The column is defined as:
{
command: [{
name: 'deleteNote',
click: deleteNote,
field: 'ID',
template: "<a class='btn btn-xs btn-danger k-grid-deleteNote'><i class='fa fa-trash-o'></i></a>",
visible: function (dataItem) { return false }
}],
width: "60px",
headerAttributes: {
style: "text-align: center; white-space: normal;",
"class": "k-text-center !k-justify-content-center"
},
attributes: {
style: "text-align: center",
"class": "k-text-center"
},
},
The visible property has a simple value in this case for testing. When run, this just produces a template error in the console
Uncaught Error: Invalid template:'<tr data-uid="#=data.uid#" role='row'><td style="text-align: center"class="k-text-center" class="k-command-cell" role='gridcell'>#= function (dataItem) { return false }(data)? '<a class='btn btn-xs btn-danger k-grid-deleteNote'><i class='fa fa-trash-o'></i></a>':'' #</td><td role='gridcell'><span class='DoctorNoteDate'>#: NoteDateTime #</span></td><td class="#= data && data.dirty && data.dirtyFields && data.dirtyFields['DoctorNotes'] ? ' k-dirty-cell' : '' #" role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['DoctorNotes'] ? '<span class="k-dirty"></span>' : '' ##:data.DoctorNotes==null?'':data.DoctorNotes#</td></tr>' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput='<tr data-uid="'+(data.uid)+'" role=\'row\'><td style="text-align: center"class="k-text-center" class="k-command-cell" role=\'gridcell\'>'+( function (dataItem) { return false }(data)? '<a class='btn btn-xs btn-danger k-grid-deleteNote'><i class='fa fa-trash-o'></i></a>':'' )+'</td><td role=\'gridcell\'><span class=\'DoctorNoteDate\'>'+$kendoHtmlEncode( NoteDateTime )+'</span></td><td class="'+( data && data.dirty && data.dirtyFields && data.dirtyFields['DoctorNotes'] ? ' k-dirty-cell' : '' )+'" role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['DoctorNotes'] ? '<span class="k-dirty"></span>' : '' )+''+$kendoHtmlEncode(data.DoctorNotes==null?'':data.DoctorNotes)+'</td></tr>';}return $kendoOutput;'
at Object.compile (kendo.web.js:198:31)
at Object.proxy [as template] (bootstrap?v=ORM1cEjHBVjtwT2V5nbx1jvidFiV26D1Qpa8Hqke8801:538:14)
at init._tmpl (kendo.web.js:55136:37)
at init._templates (kendo.web.js:55229:45)
at new init (kendo.web.js:51117:22)
at HTMLDivElement.<anonymous> (kendo.web.js:2440:36)
at Function.each (bootstrap?v=ORM1cEjHBVjtwT2V5nbx1jvidFiV26D1Qpa8Hqke8801:400:23)
at jQuery.fn.init.each (bootstrap?v=ORM1cEjHBVjtwT2V5nbx1jvidFiV26D1Qpa8Hqke8801:165:17)
at e.fn.<computed> [as kendoGrid] (kendo.web.js:2439:30)
at Object.success (TestDetailPopup.js?ver=1.0.0.12:384:31)
How do I make a command button hide conditionally? (I tried making the template for the button a function returning a string, but I could not access the underlying data, so could not make a proper comparison)
Hi,
we're selecting an item in a MultiColumnComboBox programmatically like this:
var multicolumncombobox = $("#KUNDENADRESSE_ID").data("kendoMultiColumnComboBox");
multicolumncombobox.select(0);
multicolumncombobox.trigger("select");
Our problem is now, that in the event handler for the 'select' event the e.dataItem is missing.
Is there a way to solve this?