Telerik Forums
Kendo UI for jQuery Forum
2 answers
253 views

I notice that kendo has a new feature to customize the noDataTemplate. Then you can use that to allow user adding a new item when there is no match.

Just like this example: http://demos.telerik.com/kendo-ui/multiselect/addnewitem

 

 

But what if I want to add a new item of partial match. Say you have "Chai" in the options, but I want to add "Cha". Can we do that with kendo?

Peter
Top achievements
Rank 1
 answered on 04 Sep 2020
20 answers
1.4K+ views
Hey!
I am trying to implement a timeline with year view, is there a way to do this with the scheduler?
In all of your example the maximum is month..
Thanks,
Veselin Tsvetanov
Telerik team
 answered on 04 Sep 2020
1 answer
146 views

I have charts which have dyanamic Series value text so text is getting crop.

$('#topStationsChart').kendoChart({
dataSource: topFiveStation.LstTopFiveDataItem,
chartArea: {
height: 370
},
title: {
text: selectedKPI + " by " + activeVariable,
visible: true,
},
legend: {
position: 'top'
},
seriesDefaults: {
type: "bar"
},
series: [{
//name: '',
data: totalVisit,
//type: 'column',
stack: false,
color: '#08889b'
}, {
field: 'HalfValueVariance',
//categoryField: 'TopChartVariable',
categoryField: 'TopVariableFullName', // ARME- 610
type: 'line',
width: 0,
tooltip: {
visible: true,
template: function (e) {
var value = e.value * 2;
var strcommsepvalue = CommasSperatedNumber(value);
var tooltipString = "";
var KPINameString = selectedKPI + ($(".customSwitch span.active").text() == "Percent" ? "(%)" : " ");
tooltipString += "<span style=\"text-align:center;display:inline-block;width:100%;\">";
tooltipString += (activeVariable == "Top 5 Stations" ? "Station" : activeVariable) + " : " + e.category + "</span>";
tooltipString += "<hr style=\"border-color:#ccc;margin: 5px 0;\" class=\"hrTooltps\">"
tooltipString += KPINameString + " : " + "<span  style=\"float:right;display:inline-block;\">" + strcommsepvalue + "</span>";

return tooltipString;
},
border: { color: "08889b" },
autoHide: false
},
highlight: {
toggle: function (e) {
e.preventDefault();
var visual = e.visual;
var transform = null;
if (e.show) {
var center = visual.rect().center();
// Uniform 1.5x scale with the center as origin
transform = kendo.geometry.transform().scale(1.5, 1.5, center);
}
visual.transform(transform);
}
},
markers: {
size: 30,
visual: function (e) {
var src = kendo.format('/' + "{0}", e.dataItem.IconURL);
if (e.dataItem.IconURL == null || e.dataItem.IconURL == undefined || e.dataItem.IconURL == '') {
src = "/Content/Images/stationIcon_placeholder.png";
}
var image = new kendo.drawing.Image(src, e.rect);

return image;
}
}
}],
valueAxis: {
title: {
text: strVarValTitle
},
labels: {
//format: "{0}%"
},
line: {
visible: true
},
majorGridLines: {
visible: false
},
axisCrossingValue: 0,
visible: true
},
categoryAxis: {
line: {
visible: true
},
majorGridLines: {
visible: false
},
labels: {
template: "#=shortLabels(value)#",
rotation: "auto",
visual: adjustLabelsForTopStationChart
},
visible: true,
},
tooltip: {
visible: true,
template: function (e) {
var value = e.value;
var strcommsepvalue = CommasSperatedNumber(value);
var tooltipString = "";
var KPINameString = selectedKPI + ($(".customSwitch span.active").text() == "Percent" ? "(%)" : " ");
tooltipString += "<span style=\"text-align:center;display:inline-block;width:100%;\">";
tooltipString += (activeVariable == "Top 5 Stations" ? "Station" : activeVariable) + " : " + e.category + "</span>";
tooltipString += "<hr style=\"border-color:#ccc;margin: 5px 0;\" class=\"hrTooltps\">"
tooltipString += "<span  style=\"float:left;display:inline-block;\">" + KPINameString + "</span>" + " : " + "<span  style=\"float:right;display:inline-block;\">" + strcommsepvalue + "</span>";

return tooltipString;
},
background: "rgba(248,248,248,0.8)",
color: "#333",
autoHide: false
//format: "{0}"
},
seriesHover: function(e) {
$("#topStationsChart").css("cursor", "default");
},
render: function (e) {
var tooltip = $(".customTooltipTop");
e.sender.surface.bind("mouseenter", function (e) {
if (e.element.parent.chartElement.content && e.element.parent.chartElement.text.indexOf('...') != -1) {
var pos = e.element.bbox().getOrigin();
tooltip.html(e.element.parent.chartElement.value)
                            .css({
                            left: pos.x - 60,
                            top: pos.y + 20
                            })
                            .show();
}
});
e.sender.surface.bind("mouseleave", function (e) {
tooltip.hide();
});
},
});
onBarLineChartHover(nBarLineChartLength, 13);
} else {
$("#topStationsChart").html("<div class='noData'>No Data Available</div>");
}
}

Tsvetomir
Telerik team
 answered on 04 Sep 2020
3 answers
161 views

How can i get the text field of a dropdown in the column filter?

I have the following example : https://dojo.telerik.com/izUviSID/2

Petar
Telerik team
 answered on 04 Sep 2020
1 answer
166 views

Dear Admin,

 

I am developing the list which can drag and drop in "list to list" and "item to item". But there are some bug, can you suggest anyway to overcome it. I write a example in the following. Thanks. 

 

https://dojo.telerik.com/@eltiel/uZAWoYiy

 

Regards,

Simon

Tsvetomir
Telerik team
 answered on 04 Sep 2020
1 answer
1.1K+ views

Hi all,

I have a listView with the following bindings:

listView.bind("remove", function(e) {
 
$.ajax({
type : "POST",
url : vulnerabilityAssessment.deleteVulnerabilityAssessmentItem.replace("{itemId}", e.model.id),
contentType : 'application/json',
dataType : "json",
success : function(response) {
refreshCurrentListView(listViewId, scope);
},
});
 
}
 
 
listView.bind("save", function(e) {
 
var item = {
id: ...,
vulnerabilityAssessment: vulnerabilityAssessmentId,
.....
}
if(e.model.id == null)
item.id = -1;
 
$.ajax({
type : "POST",
url : vulnerabilityAssessment.saveVulnerabilityAssessmentItem,
contentType : 'application/json',
data : JSON.stringify(item),
complete : function(e) {
refreshCurrentListView(listViewId, scope);
},
error : function(e) {
showErrorDialog(e);
},
dataType : "json"
});
});

 

And the refreshCurrentListView function as follows:

function refreshCurrentListView(listViewId, scope) {
    var type = parseInt(listViewId.substr(listViewId.indexOf("_") + 1));
    var vulnerabilityAssessmentId = $("#vulnerabilityCurrentAssessmentListView", scope).children('div').children('div')[0].id.substr($("#vulnerabilityCurrentAssessmentListView", scope).children('div').children('div')[0].id.indexOf("_") + 1);
    if(listViewId.includes("Strenght")) {
        var itemViewModel = itemViewStrength(vulnerabilityAssessmentId, type, 'S');
         
        kendo.bind  ($("#threatCurrentVulnerabilityAssessment #" + listViewId, scope), itemViewModel);
         
        $("#threatStrenghtListView_" + type + " .edit-buttons").show();
    }
}

 

I'm adding a new record on the list and as soon as I add a second row , I get the following exception:

Uncaught TypeError: Cannot read property 'data' of undefined
    at init.setup (kendo.all.min.js:27)
    at init.create (kendo.all.min.js:27)
    at Object.<anonymous> (kendo.all.min.js:27)
    at Function.Deferred (jquery.min.js:2)
    at init._promise (kendo.all.min.js:27)
    at init._send (kendo.all.min.js:27)
    at init.sync (kendo.all.min.js:27)
    at init.save (kendo.all.min.js:54)
    at HTMLAnchorElement.<anonymous> (kendo.all.min.js:54)
    at HTMLDivElement.dispatch (jquery.min.js:3)

 

This exception happens when the ajax call inside the 'save' binding takes place (and before it gets to the complete function).

Any ideas?

Georgi
Telerik team
 answered on 04 Sep 2020
2 answers
235 views

I am trying to create a kendo custom widget in typescript, but the data function always returns null.

let emptyWidget = $('#emptyCriteria').kendoEmptyTemplate().data('kendoEmptyTemplate');
 console.log(emptyWidget) // getting always undefined

 

Widget Code:

interface JQuery {
    kendoEmptyTemplate(options?: KendoWidgets.IEmptyTemplateOptions): JQuery;
    data(key: "kendoEmptyTemplate"): KendoWidgets.EmptyTemplateOptions;
}
 
module KendoWidgets {
 
    export interface IEmptyTemplateOptions {       
    }
 
    export class EmptyTemplateOptions implements IEmptyTemplateOptions{
        name: string = 'EmptyTemplate';
    }
     
    export class EmptyTemplate extends kendo.ui.Widget
    {
        options: EmptyTemplateOptions;
        constructor(element: Element, options: IEmptyTemplateOptions) {
            super(element, options);
        }           
    }
 
    // Create an alias of the prototype (required by kendo.ui.plugin)
    EmptyTemplate.fn = EmptyTemplate.prototype;
    // Deep clone the widget default options
    EmptyTemplate.fn.options = new EmptyTemplateOptions();
    // Create a jQuery plugin.
    kendo.ui.plugin(EmptyTemplate);
}

 

Html:

<div id="emptyCriteria"></div>

 

 

Any of you have encountered this issue or am I missing any methods in widget?

Hash
Top achievements
Rank 1
 answered on 03 Sep 2020
1 answer
100 views
I have been tasked to use the Kendo UI Mobile Scroller widget (https://docs.telerik.com/kendo-ui/api/javascript/mobile/ui/scroller) to hide an element in the dom when scrolling down. I am not sure which method or event I can use to do this. Any help will be so much appreciated. 
Petar
Telerik team
 answered on 03 Sep 2020
1 answer
241 views

Hi,

I have a kendo grid with few locked columns and multiple other columns. When I do navigate grid from other page it's working fine but not when refresh page using using F5 or reload option. Seems width is not set properly, please review atttached snapshots.

 

Alex Hajigeorgieva
Telerik team
 answered on 03 Sep 2020
2 answers
6.7K+ views
I've been searching through documentation and fourms with no luck.

When you create a calendar, it has a default value of null. No date is selected. I want to clear the calendar to no selection progrmaticly. If I send null via the value method it errors out and I couldn't find any other clear method.

is this possible?
todd
Top achievements
Rank 1
 answered on 02 Sep 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?