Telerik Forums
Kendo UI for jQuery Forum
1 answer
102 views

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...

 

Neli
Telerik team
 answered on 11 Nov 2022
1 answer
258 views

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");
});


Neli
Telerik team
 answered on 11 Nov 2022
1 answer
120 views

https://dojo.telerik.com/UCesAMUN

would be great to have the ability to stop the event propagation

 

Georgi Denchev
Telerik team
 answered on 10 Nov 2022
1 answer
121 views

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.

 

Lyuboslav
Telerik team
 answered on 09 Nov 2022
0 answers
726 views

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)

John
Top achievements
Rank 1
 asked on 08 Nov 2022
1 answer
137 views

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?

 

Stefan
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 08 Nov 2022
0 answers
212 views
As can be seen in the following example: https://dojo.telerik.com/@user192/aboNODeL , the "x" window closing button behaves differently from the self created closing button, as it closes the window before firing the close event. After the window is closed and pressing the open button to open the window again, the "x" window closing button behaves in the same way as the "close" button though. The close event gets fired instead of closing the window beforehand. Does anyone know why this happens and how to prevent the window from closing using the "x" button?
user192
Top achievements
Rank 1
 asked on 07 Nov 2022
1 answer
342 views

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

Martin
Telerik team
 answered on 07 Nov 2022
1 answer
318 views

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");
 var sheet = spreadsheet.activeSheet();

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.

Neli
Telerik team
 answered on 07 Nov 2022
1 answer
174 views

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.

 

 

Neli
Telerik team
 answered on 07 Nov 2022
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
AICodingAssistant
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?