Is there a way to select generated aggregates on dynamic columns. I have verified that my code creating the totals is working but I am unable to utilize them in the HTML.
Component code:
// Creating the aggregates
this.operationalReportDataService.getVolumeTrend(this.choice)
.pipe(
finalize(() => this.grid.loading = false)
)
.subscribe((data: VolumeTrend) => {
this.gridView = data.gridData;
this.colSettings = data.dateColumns;
data.dateColumns.forEach(x => this.aggregates.push({ field: x.field, aggregate: 'sum' }));
});
// Generating the values
private setAverageAndTotals(data: any[]) {
// tslint:disable-next-line:max-line-length
this.totalsAndAverages = aggregateBy(data, this.aggregates);
}
HTML:
<kendo-grid-column
*ngFor="let col of this.colSettings"
field="{{col.field}}"
title="{{col.title}}"
format="{{col.format}}" width="40" [footerClass]="{'grid-footer': true}">
<ng-template
kendoGridFooterTemplate *ngIf="this.totalsAndAverages && this.lastPage"
let-column="column">Total {{column.title}}: {{totalsAndAverages["{column.title}"].sum}}
</ng-template>
</kendo-grid-column>
It seems the exported content is too big and only exports to a single page. So the issue is that when you open in Adobe and print you have to scale the content down in order to fit the schedule onto a single sheet of paper. When you do this you lose a lot of quality in the print out where grid lines start disappearing. I have tested this with the demo app on the documentation and attached a screenshot of what happens to my print view
https://www.telerik.com/kendo-angular-ui/components/scheduler/pdf-export/
what are the options available to make these exports more printer friendly? I noticed on the PDF-Export Component there are alot more options available but on the kendo-scheduler-pdf component many of those options are not available. It's seems that allowing the PDF to span multiple pages would solve most of the issues as such drastic scaling wouldn't be necessary but I don't see any way to do that with the current kendo-scheduler-pdf component.
Hi,
I've created a panel bar similar to the demo in the below url. The panel bar have icons.
https://www.telerik.com/kendo-angular-ui/components/layout/panelbar/
I've a (MindFusion diagram) canvas in the same page in my application.
I want to drag and drop the icon from the panel bar (in the right side) and create a diagram node in the canvas (in the left side) in the dropped location.
May I know how to do that?
Regards,
Gk
As soon as I add the following lines to my component (having first imported "of" from rxjs.
public children = (dataItem: any): any[] => of(dataItem.items);
public hasChildren = (dataItem: any): boolean => !!dataItem.items;
I get the folllowing error:
Type
'Observable<any>'
is missing the following properties from type
'any[]'
: length, pop, push, join, and 18 more.
How do I implement the children and hasChildren properties?
Hello,
When I am using kendoGridRemoveCommand (or kendoGridEditCommand etc.) directives, the k-button class is added to the element automatically. How can I avoid that because I don't want any styles coming from that.
I am aware of some possible work around such as removing the class by JQuery or writing another class to override the css styles of k-button, but isn't there a better solution?
Regards.
Hi,
here: https://stackblitz.com/edit/angular-k3ifma-sth4cf
i've implemented the following:
public onDragEnd(args: DragEndEvent): void {
if (args.oldIndex !== args.index) {
console.log('update server');
} else {
console.log('nothing has changed', args);
}
}
When dragging and dropping, the if will never be true, the values of index and oldIndex are nearly always the same.
Why? Is this a bug?
Kind regards
I can't seem to handle a click event inside of a sortable object. Is this possible? My code looks like:
<kendo-sortable [kendoSortableBinding]="selectedColumns" [animation]='true' (dragEnd)='onDragEnd($event)' >
<ng-template let-column="item">
<div class="selected-column">
<span draggable="true" class="k-icon k-i-handler-drag"></span>
<span style="flex-grow: 1">{{ column.displayName }}</span>
<span (click)="removeSelectedColumn(column)" class="k-icon k-i-close" style="cursor: pointer;"></span>
</div>
</ng-template>
</kendo-sortable>
The remove span click event never fires. What's the workaround?
I am running into an issue where the multi select on checkboxes no longer works. Locally it works fine, but when I publish it it seems to quit working which makes me think it could be a package.json version issue. Has anyone else run into this? Below is a setup that I have. The selectionChange fires twice
<kendo-grid id="attachmentGrid" #attachmentGrid [data]="attachmentGridData" [height]="'250'" [selectable]="true" [kendoGridSelectBy]="'Id'"
(selectionChange)="attachmentSelectionChange($event)" [sortable]="true">
<kendo-grid-checkbox-column width="40" [minResizableWidth]="40">
<ng-template kendoGridCellTemplate let-dataItem let-idx="rowIndex">
<span *ngIf="(dataItem.Type | uppercase) === 'WORD'">
<input class="k-checkbox" id="attachment-{{idx}}" [kendoGridSelectionCheckbox]="idx" />
<label class="k-checkbox-label" for="attachment-{{idx}}"></label>
</span>
</ng-template>
</kendo-grid-checkbox-column>
<kendo-grid-column field="Name" title="Name">
</kendo-grid-column>
<kendo-grid-column field="Type" width="60" title="Type">
<ng-template kendoGridCellTemplate let-dataItem>
<span class="k-icon k-i-{{(dataItem.Type | lowercase)}}"></span>
</ng-template>
</kendo-grid-column>
</kendo-grid>
This stackblitz should show what I mean: https://stackblitz.com/edit/grid-and-detailtemplate?file=app/app.component.ts
There are two things going on, which will be easier to see if you watch the JavaScript debug console.
1. When scrolling down, page loads cause a jump in the view. Like when I scroll down to #18 and a page load occurs, the viewport will jump to row #25 or so. This happens scrolling both up and down
2. When I expand any of the detail templates, the page loading mechanism gets really wonky and only jumps between the first set of results and the last set, with a lot of whitespace at the end.
I'm sure I haven't hooked up something correctly, but I'm not sure what. Thanks!