Telerik Forums
Kendo UI for Angular Forum
4 answers
1.0K+ views

based on given example, is it possible to have an event which will fire when saveAs() done?

 

https://www.telerik.com/kendo-angular-ui/components/pdfexport/multi-page-content/#toc-page-templates

In my project there was a some data fetch from API, and it was take some time. So UI is design to show "Preparing data to be exported" Loading popup.  need to catch the moment when saveAs() completed to hide the loading.

Note that beside the request/response html file preparation and exportation also takes some time. So the opup must be closed right when saveAs() done

Martin Bechev
Telerik team
 answered on 07 May 2020
1 answer
1.6K+ views

Hi, I am using export to PDF on kendo scatter chart. I am getting error  @progress/kendo-drawing/main"' has no exported member 'DrawOptions'.

Component file:

import { pdf, exportPDF } from '@progress/kendo-drawing';
import { saveAs } from '@progress/kendo-file-saver';

 

    onClick(pdf) {
        // enable/show the loader
        pdf.export().then(group => {
         const options = <pdf.PDFOptions>{ paperSize: 'A5', landscape: true };
         exportPDF(group, options).then(data => {
            console.log('PDF ready!');
            // disable/hide the loader
            saveAs(data, 'scene.pdf');
         });
        });
     }

HTML File

<kendo-pdf-export #pdf>

<kendo-chart [pannable]="true" [zoomable]="true">
<kendo-chart-series>
<kendo-chart-series-item type="scatter" [data]="graphData" xField="inc_margin_amt" yField="inc_sales_amt">
</kendo-chart-series-item>
</kendo-chart-series>
<kendo-chart-x-axis>
<kendo-chart-x-axis-item [labels]="valueAxisLabels" [axisCrossingValue]="marginthreshold">
</kendo-chart-x-axis-item>
</kendo-chart-x-axis>
<kendo-chart-y-axis>
<kendo-chart-y-axis-item [labels]="valueAxisLabels" [axisCrossingValue]="salesthreshold">
</kendo-chart-y-axis-item>
</kendo-chart-y-axis>
<!-- <kendo-chart-series-item-tooltip format="Margin {0:c0} - Sales {1:c0}">
</kendo-chart-series-item-tooltip> -->
<kendo-chart-tooltip>
<ng-template kendoChartSeriesTooltipTemplate let-dataItem="dataItem">
<div> {{'Promo Week' | translate:lang}} : {{ dataItem.promoweek_num }} </div>
<div *ngIf="showPromoName">{{'Promo Name' | translate:lang}} : {{ dataItem.internal_promo_desc }}</div>
<div *ngIf="showCIGDesc">{{'CIG Description' | translate:lang}} : {{ dataItem.cig_desc }} </div>
<div> {{'Promotion Detail' | translate:lang}} : {{ dataItem.promotion_Detail }}</div>
<div>
<span class="pull-left">{{'INCR_MARGIN' | translate:lang}} : {{ dataItem.inc_margin_amt | currencyNumber:0:false }}</span>
<span class="pull-right">{{'INCR_SALES' | translate:lang}}: {{ dataItem.inc_sales_amt | currencyNumber:0:false}}</span>
<div class="clearfix"></div>
</div>
</ng-template>
</kendo-chart-tooltip>
</kendo-chart>

 

</kendo-pdf-export>

 

 

 

Martin Bechev
Telerik team
 answered on 07 May 2020
3 answers
262 views

I have a question. How to add content through TemplateRef to Sortable/Kendo. For example, I want to render several Windows. I can do that? Or is it for text only?

 

<kendo-sortable [kendoSortableBinding]="[contentTemplates]" class="row">

<ng-template let-item="item">
    {{item.templateRef}}
</ng-template>

</kendo-sortable>

 

contentTemplates - It is QueryList Templates

 
 
 
 
 
Vladislav
Top achievements
Rank 1
 answered on 07 May 2020
1 answer
89 views
I am trying to use the kendo-multiselct but when it tries to render it throws an error that Searchbox inputNativeelement is null. It appears to be initializing the control before it is fully setup. It throws on a call to resize the input for Searchbox and in the console I can see that the input is null. If the cursor is placed in the control it correctly sets up the control. This happens with and without using templates for items.
Hetali
Telerik team
 answered on 07 May 2020
3 answers
2.4K+ views

Not sure what that error means. Here is my tree definition:

<kendo-treeview
        textField="text"
        [nodes]="data"
        kendoTreeViewExpandable
        kendoTreeViewSelectable
        kendoTreeViewHierarchyBinding
        childrenField="items"
    >
</kendo-treeview>

And here is one from the Doc:

kendo-treeview
        [nodes]="data"
        textField="text"
        kendoTreeViewExpandable
        kendoTreeViewSelectable
        kendoTreeViewHierarchyBinding
        childrenField="items"
    >
    </kendo-treeview>

 

Trying very hard to see a difference.

 

Thanks

Martin Bechev
Telerik team
 answered on 06 May 2020
1 answer
124 views

Problem: I would like to use a kendo-combobox with the grid, so that it can interact with it. Please see image for my ideal approach.

Question: Is there a way to properly place the kendo-combobox component from within the right corner of the kendo-grid-group-panel of the kendo grid?

Martin Bechev
Telerik team
 answered on 06 May 2020
1 answer
134 views
The tooltip is not getting close when we click out of tooltip when the property closable is set to true.
Svet
Telerik team
 answered on 06 May 2020
1 answer
809 views

I am implementing a Treeview into the app. But first I need to create a wrapper. Is there a recommended way of creating Kendo components wrappers?

Thanks

Svet
Telerik team
 answered on 06 May 2020
3 answers
349 views

How to solve this. Is anybody know? Error I see is below.
Console error;

 

ng:///PersonLeaveModule/PersonLeaveCalendarNewComponent.ngfactory.js:7 ERROR TypeError: this.intlService.weekendRange is not a function at SchedulerComponent.get [as workWeek] (webpack-internal:///../../../../@progress/kendo-angular-scheduler/dist/fesm5/index.js:2710) at SchedulerComponent.notifyOptionsChange (webpack-internal:///../../../../@progress/kendo-angular-scheduler/dist/fesm5/index.js:2669) at SchedulerComponent.ngAfterContentInit (webpack-internal:///../../../../@progress/kendo-angular-scheduler/dist/fesm5/index.js:2417) at callProviderLifecycles (webpack-internal:///../../../core/esm5/core.js:12915) at callElementProvidersLifecycles (webpack-internal:///../../../core/esm5/core.js:12889) at callLifecycleHooksChildrenFirst (webpack-internal:///../../../core/esm5/core.js:12872) at checkAndUpdateView (webpack-internal:///../../../core/esm5/core.js:14022) at callViewAction (webpack-internal:///../../../core/esm5/core.js:14369) at execComponentViewsAction (webpack-internal:///../../../core/esm5/core.js:14301) at checkAndUpdateView (webpack-internal:///../../../core/esm5/core.js:14024

Martin Bechev
Telerik team
 answered on 06 May 2020
4 answers
813 views

Hello,

I can't figure out why the .net core 2.2 / Angular 8 application throw 404 error when trying to upload 40 MB file using the kendo-upload. The request didn't hit the API, it throw 404 error on the client. I'm able to upload 21 MB file, i have not attempt 30, i assumed it will work up to 30 MB based on the default body size of the post request. here the error

Access to XMLHttpRequest at 'https://web-api' from origin 'https://web-client' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

HTTP Response : 404

 

I had attempted to

- set the MaxRequestBodySize to 50 MB in UseKestrel

- set [RequestSizeLimit(50000000)] to the API method

- update the web.config requestLimits maxAllowedContentLength="52428800"

- use [chunkable] in kendo-upload

 

Something to do with chunk? or some setting in Angular? setting in kendo-upload?

 

 

Thanks,

Bryian Tan

Patrick
Top achievements
Rank 1
 answered on 05 May 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?