Telerik Forums
Kendo UI for jQuery Forum
6 answers
813 views

I am trying to export a group of charts to a pdf. The chart grouping is similar to the ones here: https://demos.telerik.com/kendo-ui/pdf-export/index

I would like to reformat them so that they fit nicely on a letter size piece of paper. I looked at the example here: https://demos.telerik.com/kendo-ui/pdf-export/page-layout.

My issue is that in this example, the web page is already formatted like the printed page. In my case I want to take example 1 (pdf-export/index) and format it like example 2 (pdf-export/page-layout).

I tried using the .k-pdf-export class to do this but my charts ended up sized incorrectly with pieces cut off. 

What is the best way to accomplish my goal?

Lee
Top achievements
Rank 2
Silver
Bronze
Bronze
 answered on 12 Dec 2019
3 answers
790 views
I am facing a problem for kendo UI element(Dropdown, MultiSelect, Grid etc. ) in our application where we are implementing Content Security Policy(CSP) in the application. We need to give “unsafe-eval” Value to CSP so that the kendo elements work on the page . But using"unsafe-eval" violates the content security policy. Without the "unsafe-eval" the kendo elements don’t work. Is there any work around if we don’t want to include “unsafe-eval” and all kendo elements should work as expected ?
Petar
Telerik team
 answered on 12 Dec 2019
1 answer
557 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.2K+ 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
188 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
600 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
843 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
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?