Telerik Forums
Kendo UI for jQuery Forum
3 answers
317 views

Hi, 

To expand on my title a bit, I have a Upload widget which doesnt allow multiple files, and validates that uploaded documents are pdf's under 4Mb.

The problem is that when a new file is uploaded to replace the existing one, the Upload widget will make a call to delete the existing document, ONLY THEN will it validate the new one. How can I trigger the validation before the delete? This would prevent my users from inadvertently deleting the previous document, if the new one is not valid.

Thanks,
Grant

Petar
Telerik team
 answered on 10 Jan 2020
8 answers
570 views
Hi There,

Is there possibly a databind functionality for the Scroll View control that you could call similarly to the ListView for example:

$("#myscrollview").kendoMobileScrollView({
            template: "<div>${data.foo}</div>",
            dataSource: kendo.data.DataSource.create([{ foo: "bar" }, { foo: "baz" }])
        });

It would help me huge amount if this was available however if not are there any recommendations regarding using templates or external databinding with the scroll view?

Thanks!

Rob
Tsvetomir
Telerik team
 answered on 09 Jan 2020
3 answers
141 views

Background

I have a Kendo autocomplete that should display a list of "recently searches" on focus. To accomplish this, I wired up a focus event, where I autocomplete.search(''). This reliably displays the default list (whole list on local datasource and whatever my server returns on empty string with a remote datasource). However, we also wish to enable the suggest option, so upon focus, the autocomplete empty searches, and suggests the first option.

IE 11 Issue
This is where the first issue occurs. On IE11, our first search is triggered, and does as anticipated (shows list, and suggests the first option). However, a second search is also fired, but uses the suggestion as the search criteria.

This can be demonstrated in an isolated Dojo: https://dojo.telerik.com/ekIXopar by selecting the autocomplete input.

 

All Browsers Issue - Search Triggered by Modifier Keys

On all browsers, even non-IE11, pressing modifer keys (eg: ctrl, shift, caps-lock, etc...) will immediately trigger a search with whatever is in the textbox (including suggestions). This causes issues when combined with the suggest is true. The real-world use case for this was having our users go to paste in something:

1. The focus search and suggest fills in the textbox with the first search result
2. The user presses ctrl in preparation to ctrl-v paste.
3. Between ctrl and v, the autocomplete will trigger another search with the now suggested text as criteria, thus narrowing the result to only the 1, AND offsetting the selection by 1 at the start of the text (ie: all but the first letter is highlighted).
4. When the user finishes the paste, the result is the first letter of the original suggestion and whatever they pasted.

This can also be demonstrated in the above dojo. Simply select the input and press and release the ctrl button. You should immediately see the first character get unselected, and "Albania" should become the only auto-suggestion result.

Possible Causes

Digging into the Kendo AutoComplete source, the keydown listener is picking up the control key as it's own keydown. From here, we have some if/elses that perform certain logic such as moving the selection up/down. However, our example of ctrl (keycode 17), falls into the else logic, which triggers a search based on the input value.

Possible Solutions

1. If I put the focus listener before the autocomplete call, I remove the initial issue... however, the fundamental issue with modifier keys triggering searches remains. This is problematic as pressing control (and other modifier keys), imho, shouldn't directly change the user's search results.

2. Add additional listeners to filter our these keys before the kendo autocomplete init, and stop the events from getting to kendo (stopImmediatePropagation). May introduce some other issues...

Question

Is there a solution to the IE11 bug? And for modifier searches, is there better work-arounds, or is this something that Kendo could address in an update?

Martin
Telerik team
 answered on 09 Jan 2020
1 answer
93 views
Hi, we're using scheduler and we have the selectable set to true so users can drag and select timeslots to create.
The issue we're having is related to the autoscrolling when the user attempts to create a selection that is longer than the display window and attempts to drag past the display window but the scheduler would not auto scroll to expand the selection.
However, if we were to expand an existing event, the handler would be able to expand past the display window and scheduler would auto scroll. We were wondering if the event creation could have the same behavior.
Martin
Telerik team
 answered on 09 Jan 2020
3 answers
2.5K+ views

Hello Telerik/Kendo People,

I have been noticing a certain lag in my application's responsiveness and using Chrome's developer tools to debug, I found out that the JS calls are being slowed with the following verbose console logs:

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

jquery-1.12.3.js:4932

The relevant SO question pointing to this is in this link: 

StackOverflow Question

Given jQuery is still in the implementation of a fix for this issue through their library, I wonder what Kendo recommends as a workaround for this issue.

Thanks.

 

Dimitar
Telerik team
 answered on 09 Jan 2020
3 answers
484 views

Hello

 

Are there any plans for annotation layer?

 

Thank you

Jeff


Dimitar
Telerik team
 answered on 09 Jan 2020
1 answer
247 views

Hi, 

Im basing this question on the Upload Confirmation Dialog (https://docs.telerik.com/kendo-ui/knowledge-base/upload-confirmation-dialog). If the user selects 'Cancel' all the existing files are visually cleared. After this I would like to re-add (visually) any existing files.

I've tried setting 'e.sender.options.files' to the initial file list, and while the widget data is updated, its not updated visually. See Dojo, https://dojo.telerik.com/odoDODUZ.

Note: Your original demo doesnt actually work, the upload continues to fail, however I've tested the behavior in my local environment, and it is as I've described.

Please advise, Thanks,
Grant

 

Ivan Danchev
Telerik team
 answered on 08 Jan 2020
3 answers
380 views
I need a method to select and use the day of the week, Mon, Tue Wed, Thu, Fri, Sat.

Is there such a method?
Nikolay
Telerik team
 answered on 08 Jan 2020
8 answers
256 views

Is possible to add alphabetical order after number in index items in kendo editor. Here we used  Kendo UI v2015.2.902 and struggle regarding this. If its possible please share programming coding also.

For example :

1.a,

1.b,

1.c,

1.1.a

2.c

2.d

Ivan Danchev
Telerik team
 answered on 08 Jan 2020
2 answers
206 views

Hi,

I have the following code in a global.js library:

$.ajaxSetup({
    // A pre-request callback function used to modify the xhr object before it is sent
    beforeSend: function(xhr){
        // Set csrf if request type is POST, PUT or DELETE
        if (this.type !== "GET") {
            xhr.setRequestHeader(csrfHeader, csrfToken);
        }
    }
});

This set the csrf token for any REST call that modifies data (POST, PUT, DELETE).

The problem is that the Upload widget does not use it, and the server requests are being rejected due to missing authorization (403 Response). This forces me to init. my Upload widget with the following callback:

upload: function(e) {
    // Adds the csrf tokens to perform POST REST calls
    const xhr = e.XMLHttpRequest;
    if (xhr) {
        xhr.addEventListener("readystatechange", function() {
            if (xhr.readyState === 1 /* OPENED */) {
                xhr.setRequestHeader(csrfHeader, csrfToken);
            }
        });
    }
}

 

Please advise why this is necessary and why this is required. Does the Upload not use jQuery to execute the Ajax calls?

Thanks
Grant

Veselin Tsvetanov
Telerik team
 answered on 08 Jan 2020
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
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
AICodingAssistant
+? 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?