Telerik Forums
Kendo UI for Angular Forum
1 answer
737 views

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>

Tina
Top achievements
Rank 1
 answered on 18 Sep 2019
3 answers
464 views

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.

 

James
Top achievements
Rank 1
 answered on 12 Sep 2019
1 answer
642 views

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

Dimiter Topalov
Telerik team
 answered on 12 Sep 2019
1 answer
42.4K+ views

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?

 

 

 

 

 

Dimiter Topalov
Telerik team
 answered on 06 Sep 2019
4 answers
1.0K+ views

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.

Brian Edwards
Top achievements
Rank 1
 answered on 03 Sep 2019
4 answers
134 views

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

Robert
Top achievements
Rank 1
 answered on 03 Sep 2019
10 answers
914 views

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?

Dimiter Topalov
Telerik team
 answered on 03 Sep 2019
5 answers
1.5K+ views

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>

 

 

 

Dimiter Topalov
Telerik team
 answered on 02 Sep 2019
2 answers
445 views
I have a grid with many narrow columns and would like to be able to rotate the column headings at 45 degrees to get a more compact grid.  I've previously used the CategoryAxisLabels settings in a Stacked Column Chart which has a rotation option to support a 45 degree category label,  but I cant find anything equivalent for the grid. Any suggestions?
Mike
Top achievements
Rank 1
 answered on 30 Aug 2019
7 answers
1.0K+ views

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!

Dimiter Topalov
Telerik team
 answered on 30 Aug 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?