Telerik Forums
Kendo UI for jQuery Forum
1 answer
545 views

Hello, are you planning to remove the unsafe-eval as part of the content security policy?

 

In this documentation is saying that this is required

https://docs.telerik.com/kendo-ui/troubleshoot/content-security-policy

We need to remove this option from our website and we can't due Kendo library. Are you going to change this requirement in some of the upcoming version?
Thanks,


Petar
Telerik team
 answered on 12 Dec 2019
8 answers
1.1K+ views
There isn't a function in kendo for a window to set the location / position of the window. It took me 30 minutes to figure this out, hopefully it'll help someone.

var kendoWindow = $("#window").data("kendoWindow");

kendowWindow.element.parent().css({left:400,top:200});

The kendowWindow object contains the content of the window, and that is contained inside another div which has the window bar.
Ivan Danchev
Telerik team
 answered on 12 Dec 2019
4 answers
186 views

Hello Kendo support!

 

I am trying to plot a chart in which a serie ends in a desired x value and another serie starts from a desired x value. (I already tried the valueAxis min property, but this is not what I need at all).

 

To make the question clear, I am uploading two images that represents what I want graphically ;)

 

I need this quickly, since I need to deliver a feature with this behavior on the chart.

 

Thank you very much!

 

Best regards,

Nilton

Nilton
Top achievements
Rank 1
Iron
 answered on 10 Dec 2019
1 answer
1.1K+ views

Hello,

I am creating a jQuery grid dynamically like below.  A user is able to add new data (columns) via an external dialog and button.  When the button is clicked a new column is added to the dynamic list for the grid's data and then I send the "read" and "refresh" commands for the grid.  However, the grid never displays the grid with the new column.  The new column also doesn't show when physically click on the refresh icon button on the bottom of the grid.

Here's how I create my grid:

function createGrid(gridName, baseUrl) {
    $.ajax({
        type: "POST",
        url: baseUrl,
        dataType: "json",
        success: function (response) {
            var sampleDataItem = response[0];
            var model = generateModel(sampleDataItem);
            var dataSource = generateDataSource(baseUrl, model);
            var columns = generateColumns(sampleDataItem);
            var gridOptions = {
                toolbar: [
                    { template: kendo.template($('#toolbartemplate').html()) }
                ],
                dataSource: dataSource,
                dataBound: grdRRManagement_OnDataBound,
                columns: columns,
                pageable: {
                    pageSizes: [5, 10, 20, 50, "all"],
                    numeric: true,
                    refresh: true
                },
                editable: false,
                selectable: false
            }
 
            var grid = $("#" + gridName).kendoGrid(gridOptions);
        },
        error: function (error) {
            console.log("Error while creating R&R Management Grid! " + JSON.stringify(error));
        }
    });
}
 
function generateModel(sampleDataItem) {
    var model = {};
    var fields = {};
    for (var property in sampleDataItem) {
        if (property.indexOf("ThreatId") !== -1) {
            model["Id"] = property;
        }
        var propType = typeof sampleDataItem[property];
 
        if (propType === "number") {
 
            fields[property.replace(/(\n|\r|[^a-zA-Z0-9])/g, '')] = {
                from: "['" + property + "']",
                type: "number",
                validation: {
                    required: false
                }
            };
            if (model.id === property) {
                fields[property].editable = false;
                fields[property].validation.required = false;
            }
        } else if (propType === "boolean") {
            fields[property.replace(/(\n|\r|[^a-zA-Z0-9])/g, '')] = {
                from: "['" + property + "']",
                type: "boolean"
            };
        } else if (propType === "string") {
            var parsedDate = kendo.parseDate(sampleDataItem[property]);
            if (parsedDate) {
                fields[property.replace(/(\n|\r|[^a-zA-Z0-9])/g, '')] = {
                    from: "['" + property + "']",
                    type: "date",
                    validation: {
                        required: false
                    }
                };
                isDateField[property] = true;
            } else {
                fields[property.replace(/(\n|\r|[^a-zA-Z0-9])/g, '')] = {
                    from: "['" + property + "']",
                    validation: {
                        required: false
                    }
                };
            }
        } else {
            fields[property.replace(/(\n|\r|[^a-zA-Z0-9])/g, '')] = {
                from: "['" + property + "']",
                validation: {
                    required: false
                }
            };
        }
    }
 
    model.fields = fields;
    return model;
}
 
 
function generateDataSource(baseURL, model) {
    var dataSource = new kendo.data.DataSource({
        transport: {
            read: {
                url: baseURL,
                dataType: "json",
                contentType: "appliation/json",
                async: true,
                cache: false
            }
        },
 
        schema: {
            model: model
        },
        pageSize: 50
    });
 
    return dataSource;
}

 

var grid = $("#RRManagement").data("kendoGrid"):

//I've tried read() and refresh()
grid.dataSource.read();
grid.refresh();

//I've also tried sync(), but I only get the spinning loading icon that never goes away.
grid.dataSource.sync();

 

I'm not sure what I'm doing wrong.  Any help is appreciated.  Thanks.

Shawn A.

 

Viktor Tachev
Telerik team
 answered on 09 Dec 2019
3 answers
4.0K+ views

Hi 

We have integrated KendoUI Grid in our project and it went fine. But until recently we used it for a particularly complicated page, the performance become very slow and unacceptable when browse in IE. We tested IE8,9,11, all perform poorly. sometimes we even get the "stop script" error in IE. 

Is there any suggestion? or solutions?

 

Here's some details:

  • Kendo UI v2014.3.1119  
  • 33 columns
  • 250+ rows
  • 3 level grouping
  • some column is cell editable 
  • no paging is allowed
  • use groupHeaderTemplate and groupFooterTemplate to display subtotal
  • 2 columns freeze

 

Tsvetomir
Telerik team
 answered on 09 Dec 2019
3 answers
597 views

I am trying to export my chart to PDF however the colors are all changed to black. I also have an issue exporting a map where the css filter applied to the map tiles is missing and the map markers are all black instead of orange. I am using css properties to set the colors of the markers and bar chart on the screen. I suspect that they might not be compatible with the method Kendo UI is using to convert html to kendo.drawing.drawDOM. I tried overriding this using:
.k-pdf-export {
    #impactChart g g g path {
        fill: green !important;
    }
}

however this did not work. The chart still rendered as black. 

How do I fix this?

Is there a way to debug without exporting to PDF every time so I can take advantage of Chrome's developer tools?

Is there a list of incompatible CSS properties and workarounds?

Tsvetomir
Telerik team
 answered on 09 Dec 2019
4 answers
1.0K+ views

Hi ,

I'm trying to update a ASP .NET application which uses Kendo 2017.2.504 library to 2019.3.1023 by using Visual Studio's Telerik plugin for ASP .NET MVC projects.

The update was seamless. But now some of the padding/margin inside some of the controls seems to have got mis-aligned. Please have a look at the attached pictures before & after the update. I'm using Kendo CDN css & javascript files in my _Layout.chtml file

If I create a new MVC project and use the 2019.3.1023 library to create new screens, this problem is not seen. I tried to walk through the css, but it's very tough to follow. Please let me know how to investigate this problem.

 

Best Regards

 

Achilles

 

Achilles
Top achievements
Rank 1
 answered on 09 Dec 2019
7 answers
831 views
I am facing two different problems when pressing  the export to PDF button external to the Kendo Grid (We are using : kendo.web.min v2015.2.624  and pako_deflate.min 2015.2.624 to enable compression in the PDF - we are using local data)
1- The time it takes to export data to PDF is almost 10 times the excel export for the same set of data.
2- Firefox is giving the warning dialog box (attached) that the script is unresponsive.

thanks
Lee
Top achievements
Rank 2
Silver
Bronze
Bronze
 answered on 06 Dec 2019
10 answers
1.0K+ views
Hi,

I'm using the TabStrip to break up the data I need to submit, and the Kendo client-side validator to perform validation on that data.

If I'm on the 2nd tab and click the form's submit button and there's a piece of data missing from the 1st tab (i.e. it fails validation), how can I "jump back" to the tab with the validation error on? The validator works perfectly, e.g. it stops form submission, displays the error message (when you gp back to the tab manually), I just need to move the user back to the tab with the error message on.

Thank you,

Dan F.
Alon
Top achievements
Rank 1
Veteran
 answered on 05 Dec 2019
1 answer
367 views
I would like to add a title page or a styled title that appears on the first page only to the grid's pdf export. Is there a way to do this?
Ivan Danchev
Telerik team
 answered on 05 Dec 2019
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?