Telerik Forums
Kendo UI for Angular Forum
1 answer
540 views

Hi, I have two grids to export to excel in one worksheet. #gridData is main grid with report data, #grid1 is report filter data.  However, if user doesn't wants to see #grid1 in excel, it should only export #grid to excel. Can you tell me what I need to change with these codes? Thank you.

--first grid

<kendo-grid #grid [data]="gridData" (excelExport)="onExcelExport($event, grid1)">

<ng-template kendoGridToolbarTemplate>

<button type="button" kendoGridExcelCommand><span class="k-icon k-i-file-excel"></span>Export to Excel</button>
</ng-template>
<kendo-grid-excel fileName="reportname" ></kendo-grid-excel>
</kendo-grid>

--second grid

<kendo-grid [data]="dataFilters" (excelExport)="onExcelExport1($event)" #grid1  [height]="50" >
<kendo-grid-excel [fileName]="reportname" ></kendo-grid-excel>
</kendo-grid>

 

public onExcelExport(e: any, grid): void {
e.preventDefault();
this.sheetData = e;
grid.saveAsExcel();
}

onExcelExport1(e){
let dataFromFirstGrid = this.sheetData.workbook.sheets[0].rows;
e.workbook.sheets[0].rows.push({cells: []});
e.workbook.sheets[0].rows = [...e.workbook.sheets[0].rows, ...dataFromFirstGrid];
}

Martin Bechev
Telerik team
 answered on 16 Nov 2020
1 answer
329 views
If the editor is in readonly mode, I can't change its contents programmatically. I would expect that the user is not allowed to change the content, but not the developer. See the example below - if I click the button "Click me" the text in the editor does not change. I would expect it to change to "bla".

 

Is that possible in readonly or disabled mode?

 
import { Component } from "@angular/core";
 
@Component({
  selector: "my-app",
  template: `
    <kendo-editor
      [value]="value"
      [readonly]="true"
      style="height: 370px;"
    ></kendo-editor>
    <button (click)="onClickme()">Click me</button>
  `
})
export class AppComponent {
  public value = "eeeeee";
 
  onClickme() {
    this.value = 'bla';
    console.log('clicked');
  }
}
Martin Bechev
Telerik team
 answered on 16 Nov 2020
1 answer
379 views

Hello,

I'm currently trying to export an excel file from a grid with a custom filename. Everywhere I look the go-to suggestion is to use the

ExcelExportEvent

and 

e.workbook.fileName

to update the file name. This doesn't appear to work anymore. Looking into the source code I found the following lines trying to save a file:

saveFile(options) {
toDataURL(options).then((dataURL) => {
saveAs(dataURL, this.fileName, {
forceProxy: this.forceProxy,
proxyURL: this.proxyURL
});
});
}

 

This clearly indicates that this.fileName is used, which is initialized once to "Export.xlsx" and then never read back from the event again.
Is this intended behaviour? If so, has the ability to override the export name completely been removed?

Best Regards
Philipp

Dimitar
Telerik team
 answered on 16 Nov 2020
3 answers
498 views
hi, i'm trying to make a responsive toggle for mini mode for the drawer component. Can we achieve this with just CSS? Thx!
Dimitar
Telerik team
 answered on 16 Nov 2020
4 answers
467 views

Hello,

I need an on close event of each tab in a tabstrip component in Angular typescript.

How can we achieve that please ??

Thanks

Martin Bechev
Telerik team
 answered on 13 Nov 2020
1 answer
408 views

Hello,

After doing Group By on a grid. I'd like to expand/collapse a group in a Grid by clicking the entire row of the group header, not just the litte arrow on the left.

Currently, if we click on little group by arrow on the left side it will expand/collapse the group. Instead, need to expand/collapse by clicking the entire row of the group header. 

I have attached a screenshot for better clarification. 

Any help would be appreciated. Thanks in advance. 

Martin Bechev
Telerik team
 answered on 12 Nov 2020
0 answers
1.0K+ views

I am creating unit tests using jest and I can't run the test because of Angular not like "on" inside the [onLabel] attribute in kendo-switch.  Is there a work around for this?  

 

Template parse errors:
    Binding to event property 'onLabel' is disallowed for security reasons, please use (Label)=...
    If 'onLabel' is a directive input, make sure the directive is imported by the current module. ("
              (valueChange)="switchPageSize($event)"
              [offLabel]="'All'"
              [ERROR ->][onLabel]="'All'">
            </kendo-switch>
          </ng-template>
    "): ng:///DynamicTestModule/HistoryComponent.html@199:10

wil
Top achievements
Rank 1
 asked on 11 Nov 2020
1 answer
1.3K+ views
Hello. Is it possible to use custom svg icon instead default icon <kendo-grid-column-chooser>? And also can i add some text label near icon?
 
Martin Bechev
Telerik team
 answered on 11 Nov 2020
3 answers
174 views
I want to concat two properties to be displayed in the text field.suppose I have first-name and lastname property present in my object and I want to display something like textField=firstName+'  '+ lastName.how do I achieve this with combobox textField.
Martin Bechev
Telerik team
 answered on 11 Nov 2020
4 answers
1.7K+ views

I don't see anything in the docs but it seems like a standard thing to have.

What I'm looking for - the user will perform an action on a node in my TreeView which will result in a call to a remote API that can (sometimes) take several seconds.  I'd like to disable the TreeView or set it to loading so that the user knows there is some activity and to also prevent interaction with the TreeView.

What's the Kendo way to do this?  I can overlay a "busy" div but I'd like it to be visually close to the Grid loading appearance.

Dimiter Topalov
Telerik team
 answered on 11 Nov 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?