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?
I have a spreadsheet that gets data loaded from a database. I want to add validation to a range of cells, but I never know how many columns or rows until after the data is loaded. So my question is: How do I do this with jquery? The validation is fairly simple. Each character can be a number or a colon :
Thank you in advance
To illustrate the probelm I will use a simple example. I'm using the following code in the OnSelect() event handler:
var spreadsheet = $("#spreadsheet").data("kendoSpreadsheet");sheet.range(1,5,1,1).select();
The problem is that it never really highlights the correct cell and the cell it does select varies depeding on whether I use the left, right, up or down scroll key to navigate. I'm not sure what is going on under the covers, but I'm guessing that the issue has to do with the fact that the selection was changing from one cell to another before the event was called, therefore, there is some soft of clash or confusion between the two select events.
I use the exact same code when I initalize the spreadsheet and it works perfectly. Inside the event handler though, I cannot figure out what it's doing.
Also, is there any documentation on the arguments that are passed to event handlers. There is a lot of stuff going in there but I cannot find any good documentation on it? I find that the API documentation does not go very deep, especially with events.

If you have defined an action for OnSelect, is there a way to cancel the navigation from within the function? I think Kendo does this with Validation. If you add Validation to a cell, then enter invalid data and try to navigate to another cell, the navigation is cancelled until you either fix the data or Cancel the input. Is there a way to replicate that behavior in my own code within the OnSelect event. There is no equivalent to blur when you leave a cell so the next best thing would be to do something as you select another.

Hi,
I have a requirement for a multi-select drop down within each cell of a specific column within a Kendo spreadsheet control.
Is this possible? I can't find any documentation around this. I would be really appreciative if someone could help me with code samples/demos
Thanks
Ian
Hi,
I was trying to update my kendo version to the latest available (from 2019 to 2022) and when compiling my scss files I always get an error saying that my CSS is invalid after "...-header-border," which most likely corresponds to the $grid-header-border variable in the grid's theme file.
Invalid CSS after "...-header-border,": expected expression (e.g. 1px, bold), was ");"
I have downloaded the latest version from Node. I added the classic version.