Telerik Forums
Kendo UI for jQuery Forum
1 answer
559 views

I am trying to delete more than 100 rows at a time from the grid.
I have a checkbox to select individual rows or a common checkbox to select all the rows on the page. The grid page size is 100.
The response from the server takes 3 secs but to delete it from the front end takes 15 secs i.e. the success function of ajax call.

 

I have also tried in the sucess function :-

$("#grid").find("input:checked").each(function () {                  
    var grid = $("#grid").data("kendoGrid");
    if (!$(this).parents('th').length) {
      grid.removeRow($(this).closest('tr'));
    }
  })    
}

This also has lead to 1 sec improvement in performance.

var selectedIds = grid.selectedKeyNames(); // gets the selectedrows
var param = $.param({ selectedIds : selectedIds }, true);
 
$.ajax({
    method: "POST",
    contentType: "application/json; charset=utf-8",
    dataType: "json",
    url: "testurl/?" + param ,
    success: function(response) {
        console.log(response);
        if (response.Success == true) {
            selectedIds.forEach(function(selectedId) {
                var item = grid.dataSource.get(selectedId);
                delete grid._selectedIds[selectedId]
                grid.dataSource.remove(item);
            });
            if (grid.dataSource.view().length == 0) {
                var currentPage = grid.dataSource.page();
                if (currentPage > 1) {
                    grid.dataSource.page(currentPage - 1);
                }
            }
        } else {
            alert("ERROR " + response.Error.Message);
        }
    },
    failure: function(err) {
        alert(err);
    }
});
}
Alex Hajigeorgieva
Telerik team
 answered on 30 Apr 2020
20 answers
1.4K+ views

Hello,

I'm trying to implement a custom widget using TypeScript. I will not inherit from another Widget.

Is there any sample or documentation? 

This is my code:

module mycompany.MyWidgets {
  "use strict";
 
  export class SampleWidget extends kendo.ui.Widget {
    constructor(element: Element, options?: MyInterfaces.ISampleOptions) {
      super(element, options);
    }
  }
   
  SampleWidget.fn = Sample.prototype;
  $.extend(true, {}, SampleWidget.options);
  (<ISampleOptions>SampleWidget.options).name = "SampleWidget";
  kendo.ui.plugin(SampleWidget);
}
interface JQuery {
  kendoSampleWidget(options?: ISampleOptions): JQuery
}

 

But the widget will not be used. Not using data-role nor jQuery selector $("#mydiv").kendoMyWidget();

Samples:

<div id='widgetcontainer' data-role='samplewidget'></div>

The widget constructor not will be called.

And:

<div id='widgetcontainer'></div>

window.onload = () => {
    $('#eidgetcontainer').kendoSampleWidget();
};

A script error will be shown (kendoSampleWidget is not a function)

What's the correct way?

Regards

Ralf

 

Joshua
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 30 Apr 2020
3 answers
1.3K+ views

After user saved the data in Popup, I want to prevent it from closing so user can adjust the data a little bit and then saved again many times.

How can I do that?  Thanks.

Viktor Tachev
Telerik team
 answered on 30 Apr 2020
1 answer
6.9K+ views

Kendo Grid Filter Date Column with format:

Hello,

I have a kendo grid with a date column

I'd like to create a filter for this column 

The fitler would be a calendar (datepicker)

The Back-end returns this date format: "2018-11-07T00: 00: 00.000"

Then the date will be converted into the column template

-------------------------------------------------------------------------------

Column of grid:

field: 'dateA', title:'"Date"',width:175, template: kendo.template($('[id=myTemplate]').html()),format: '{0:"dd-MM-yyyy "}',filterable: {ui: 'datepicker'}},"
 
-----------------------------------------------------
<script id="myTemplate" type="text/x-kendo-template">
#if(!Utils.isNullOrUndefined(dateA)){#
#:kendo.toString(kendo.parseDate(dateA, "yyyy-MM-ddTHH:mm:ss"), "dd-MM-yyyy")#
 #}else{#
 -
#}#
</script>

 

The filter does not work.

I'd like to filter date with this format " dd-MM-yyyy" using calendar widget

How can I solve this problem?

 

Shoji
Top achievements
Rank 2
 answered on 30 Apr 2020
12 answers
773 views

Hi,

I'm developing an SharePoint Framework webpart with Kendo UI and AngularJS. Kendo UI requires jQuery before AngularJS. As I want to develop multiple webparts with AngularJS and Kendo UI I decided to reference AngularJS and Kendo UI from external cdns.

 

This is the externals section in my config.json:

"externals": {
    "jquery": {
        "globalName": "jquery"
    },
    "angular": {
        "globalName": "angular",
        "globalDependencies": [
            "jquery"
        ]
    },
    "kendo": {
        "globalName": "kendo",
        "globalDependencies": [
            "jquery",
            "angular"
        ]
    }
},

 

I load AngularJS and Kendo UI in my Webpart.ts file:

import * as angular from "angular";
import "kendo";

 

My Angular app is working and the kendo.all.min.js file is loaded. I try to load the Kendo module like this:

angular.module("TestExternalWebpart", [ "kendo.directives" ]);

 

I get the following error from AngularJS:

Module 'kendo.directives' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.

 

I've already tried to load Kendo with the following code in my webpart but I get same error:

import * as angular from "angular";
require("kendo");

 

How can I load Kendo UI from external cdn in a SPFx webpart? I've also created a sample on GitHub which produces the same error: https://github.com/jbgeesink/SPFx/tree/master/ExternalWebpart

 

Thanks!

Veselin Tsvetanov
Telerik team
 answered on 30 Apr 2020
3 answers
1.6K+ views

Hi,

 My web application uses Webpack and has been working great with Kendo UI (FREE.) This afternoon I pulled a copy of Kendo UI PRO (version: 2015.3.1005) from the private repository using bower and attempted to require("kendo-ui").

 The project builds successfully with Webpack but unfortunately on loading the web application it registers the following error in the console:

 "Uncaught TypeError: Cannot read property 'extend' of undefined"

 I've narrowed down the error to the kendo.editor.min.js, individually adding ALL other component references and excluding editor works as expected. Inclusion of kendo.editor.min.js breaks the project.

The function call involved seems to be:

function(){!function(e,t){var n,i,r=window.kendo,o=r.ui.editor,a=o.Dom,s=e.extend,l="xx-small,x-small,small,medium,large,x-large,xx-large".split(",")....

mehmet
Top achievements
Rank 1
 answered on 30 Apr 2020
1 answer
484 views

I am using a row template script in my kendo grid. By default, I want some columns to be hidden using the hidden: true property. When the grid is rendered, the column header of the hidden column does not appear, but the row data is still present. Here's a dojo showing my problem: https://dojo.telerik.com/IjUkuLAw

I also tried passing my column object as parameter to the template and then using some if-else condition inside it. This surely hides the column, but then if I want to hide any other column or show the previously hidden column using the columnMenu and then refresh the grid, the same problem arises. Here's an example: https://dojo.telerik.com/oMokUMUT/3

Also, I don't want to use any column template and would want to use the row template itself.

Plamen
Telerik team
 answered on 30 Apr 2020
2 answers
113 views

i have datepicker with mindate: 04/25/2020. today is 04/28/2020 and i disabled dates  < today, so how can I display 04/25/2020 in datepicker

my code:

<p> $("#txtStartDate").kendoDatePicker({<br>   format: "MM/dd/yyyy",<br>   isReadOnly: true,<br>   disableDates: function (date) {<br>      return compareDates(date);<br>   }<br>});</p><p></p><p>function compareDates(date) {<br>        var date = date && date.setHours(0, 0, 0, 0);<br>        var systemDate = getSystemDate();<br>        return date <= systemDate;<br>    }<br><br>    function getSystemDate() {<br>        var systemDate = new Date();<br>        systemDate.setDate(systemDate.getDate() - 1);<br>        return systemDate.setHours(0, 0, 0, 0);<br>    }</p>
Nikolay
Telerik team
 answered on 30 Apr 2020
4 answers
1.7K+ views

Hi.

I'm having issues trying to display tooltips only for grid headers and cells that have ellipsis using the logic indicated here:

http://docs.telerik.com/kendo-ui/controls/layout/tooltip/how-to/show-on-ellipsis

 

Here is an example:

http://dojo.telerik.com/OjUJI

 

The issues I'm experiencing:

 

1. When hovering over an element for the first time, an empty tooltip is displayed.

For example, hover over the OrderID column header right after clicking on the "Run" button. If you move the mouse out of the column header than back, no tooltip is displayed. I didn't expect an empty tooltip to be displayed for this element at all, even during the first mouse over.

 

2. Grid headers with ellipsis don't display a tooltip.

For example, hover over any of the last three columns.

I expected a tooltip to be displayed.

 

3. Not all grid cells with an ellipsis display a tooltip.

For example, hover over the cells with a "Ship Name" containing any of the following values:

a. Vins et alcools Cheva...

b. Victua... en stock

 

Thank you.

Dimitar
Telerik team
 answered on 30 Apr 2020
1 answer
119 views

 

We have requirement to display pager for grid in below format

1 2 3 4 5 >
< 6 7 8 9 10 >
<11 12 13 14

Displaying like below format currently

 

|< < 1 2 3 4 5  > >|

Can you please suggest how to achieve this feature

 

 

 

 

 

Ivan Danchev
Telerik team
 answered on 28 Apr 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
Drag and Drop
Application
Map
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
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
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?