Telerik Forums
Kendo UI for jQuery Forum
3 answers
511 views

I am making an application where it will be necessary to create a PDF with more than 2 pages.
From the documentation I saw that it is necessary to generate the HTML in a DIV and generate the PDF.
This is working fine when it's just a page.
But for multiple pages this is giving problem.

 

What I need is a way to "hide" the "GeneratedPDF" Div for the user and only generate the PDF (when hidden the content is not generated in the PDF).

And how do I page break between the two sample URLs?

 

My code:

<div id="GeneratedPDF"></div>

<input type="button" class="button blue" id="btnCreatePDF" value="Create PDF" />

<script>
    $("#btnCreatePDF").click(function () {
        var html = "";
        $.ajax({
            url: "/PageForTheExample1",
            type: "GET",
            dataType: "html",
            success: function (data) {
                html += data;
                $.ajax({
                    url: "/PageForTheExample2",
                    type: "GET",
                    dataType: "html",
                    success: function (data) {
                        html += data;                              
                        CreatePDF(html);
                    }
            }
        });
 
    });
    function CreatePDF(html) {
        $('#GeneratedPDF').html(html);
        kendo.drawing.drawDOM($('#GeneratedPDF')).then(function (group) {
            kendo.drawing.pdf.saveAs(group, "Export.pdf");
        });
    }
</script>

 

xxx

Martin
Telerik team
 answered on 18 Sep 2019
1 answer
655 views

Hi,

Sorry in advance but I have no example in hand now by writing post.
I will try to explain clearly.

I have a MVVM implementation with a fruits property bound to a selectDropdown widget.
This property is an empty array by default (fruits: [])

I have a dataSource dsource instance which call a remote endpoint.
I call the fetch method manually and define a callback function which do some tasks :

- dsource.filter(...);
- dsource.sort(...);
- viewModel.set('fruits', dsource);

(Note that I didn't applied dsource as default value of my fruits property cause of specific mvvm implementation)

 

My issue is :
Everything works well unless if my dsource return empty data.
In this case, filter, sort or set dsource to viewModel are calling the read method a second time.
It can call the read method 4 times (1 for first call, 1 for filter, 1 for sort and 1 for view model set method).

Why ? it should not cause my dsource has been instantiated and call a first time...

Thanks :)

moosh

Alex Hajigeorgieva
Telerik team
 answered on 18 Sep 2019
2 answers
183 views

Hello,

Look example: https://docs.telerik.com/kendo-ui/controls/diagrams-and-maps/map/how-to/drag-and-drop-markers

This sample work in Chrome, but it don't work in IE11.

How can i use it in IE11?

Alexander
Top achievements
Rank 1
 answered on 17 Sep 2019
3 answers
648 views
I've defined a notification on my JSP page using the jsp taglib, and it works great if I'm using it in javascript from button actions or click events.  But if I try to access it as part of my ready function processing the following call returns 'undefined'.
var notification = $("#notification").data("kendoNotification");
It almost makes me think the widget hasn't fully initialized or something.  I want to avoid having to define everything via JS in the ready function, since that defeats the purpose of even having the taglib.  Am I doing something wrong, or is this not possible?
Thanks
Software Answers
Top achievements
Rank 1
Iron
Iron
 answered on 16 Sep 2019
1 answer
751 views

Hello,

My project has a problem about combobox column.

Then i follow your example about how to implement dropdownlist in grid control (https://demos.telerik.com/kendo-ui/grid/editing-custom) but i want to use combobox.

Unlucky, i get some problems and combobox shows "undefined" value after it lost focus.

I want send you a movie about it.

What should i do?

Here my movie: https://www.loom.com/share/02eab3b36cf74eb3b10f98c0af721404

Thanks.

Viktor Tachev
Telerik team
 answered on 13 Sep 2019
1 answer
100 views

Use IE 11 to load the Grid Element show error. (capture screen attached)

And show that in 'kendo.all.js' line 3416

return support.matchMedia && window.matchMedia(media).matches;

IE not support this syntax.

 

 

Viktor Tachev
Telerik team
 answered on 13 Sep 2019
6 answers
587 views

Hi,

I want to set the start time and end time  with remote data in Gantt CustomView,

so i call ajax then put them into "range" function, But the result  show out "undefined", 

my code bellow: 

  kendo.ui.GanttCustomView = kendo.ui.GanttView.extend({
            name: "custom",
            options: {
                yearHeaderTemplate: kendo.template("#=kendo.toString(start, 'yyyy')#"),
                quarterHeaderTemplate: kendo.template("# return ['Q1', 'Q2', 'Q3', 'Q4'][start.getMonth() / 3] #")
            },
            range: function(range) {
                var startD = '';
                var endD = '';
                $.ajax({
                    type: "post",
                    url: "@Href("~/Home/GetMinAndMaxDate/")",
                    data: { 'EmpNo': @Model.EmpNo },
                    async: false,
                    success: function (data) {
                        startD = data.split(";")[0];
                        endD = data.split(";")[1];
                    },
                    error: function () { alert("edit Error") }
                });
                this.start = new Date(startD);
                this.end = new Date(endD);        
            },

Shouldn't I do this? And how to set the date in remote way?

Thanks,

Liu

Dimitar
Telerik team
 answered on 13 Sep 2019
1 answer
272 views

Hi Guys,

Just want to tell you about a problem I've found in case it affects anybody else.

After upgrading from Angular 7 to Angular 8 we kept getting the error Cannot read property 'data' of undefined for any kendo grids using a transport object.

The error was in kendo.data.js, what was happening was the kendo code is using $.extends to clone the transport object but only the properties were being cloned, so when kendo tries to execute the read function, it does not exist on the cloned transport object.

It turns out that as part of the Angular upgrade, typescript is updated to 3.5.3 and the CLI has been changed to build using ES2015 rather than es5. ES2015 uses native javascript classes and the version of jquery we are using (1,11,1) doesn't include the functions when extending those classes.

As a work around, we have changed the target back to es5 in the tsconfig.json. 

Hopefully Kendo will switch to Object.assign instead of $.extends to clone their object as this plays nice with ES2015 / ES6

Nikolay
Telerik team
 answered on 12 Sep 2019
3 answers
602 views
Is there a way to implement a grid filter that would ignore diacritic characters (accent)?

If your filter value is "Deja vu", a value equal to "Déjà vu" would be considered as a match.

Right now, it is possible to implement a custom logic for sorting local data, but filtering doesn't seems offer such flexibility.

Best regards,

Simon
Viktor Tachev
Telerik team
 answered on 12 Sep 2019
3 answers
226 views

Remove kendo multiselect for kendo.all.min js file and create a custom kendo.multiselect.min.js

 

In my project i am using v2017 of kendo.all.min.js. but in case of kendo multiselect with server filttering , i am facing a issues while a adding custom data into the  datasource. if  i change a the version 2015 the multiselect are working bu other things are not working. so i want to remove mutiselect from kendo.all.min.js (v2017) and create a separate kendo.multiselect.min.js file with v2015

Petar
Telerik team
 answered on 10 Sep 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?