Telerik Forums
Kendo UI for Angular Forum
2 answers
228 views

Hi, 

How can i specify the paper size in the kendo-pdf-export tag ?

Example:

<kendo-pdf-export #pdf paperSize='["210mm", "297mm"]'></kendo-pdf-export>

 

I try to do this and pdf.saveAs() return the error "Unknown paper size" (screenshot).

 

Regards,
Murilo Alves.

Murilo
Top achievements
Rank 1
Veteran
 answered on 18 Sep 2020
1 answer
111 views

For the Agenda view, when you use the resource grouping you have column order of [Resource, date, time, event].  So that is saying, here is a resource and here are the events dates/times for that resource. 

I am looking for a reverse type of grouping where the scenario is [Date, Resource, time, event].  So i want to say, for this date here are all my resources and their events for that date.  So on 9/1/6/2020 it might show 3 of my rooms and then the times and names for all those events.

Additionally is it possible to add custom columns? 

I have 2 different use cases that I am trying to satisfy and I am hoping this scheduler can do that so I don't have to build something custom.

1.  I want to look at a day and see a list of all my resources that have events going on that day.  Reverse resource grouping would satisfy that.  I know the Timeline view does something similar but I don't want the horizontal scrolling.  Vertical scrolling is preferable and more mobile friendly.

2.  I want a daily planner where I can view all my events for a day in chronological order.  Adding a custom column can assist is telling me the resource a particular event belongs too without cluttering up the "Event" cell with resource information.

Martin Bechev
Telerik team
 answered on 18 Sep 2020
1 answer
105 views

Hello,

When i try to serialize a grid state object with aggregate operation using the `toDataSourceRequest ` or `toDataSourceRequestString` API's they simply get ignore/not mentioned in the output. ( i'm trying to achieve server side aggregation )

state object example : 

{
    skip : 0,
    take : 10,
    group : [
             {
                     aggregates: [ { field: 'myField', aggregate: 'count' } ],
                    field: 'myField'
              }

          ]
}

toDataSourceRequest output : {page: 1, pageSize: 10, group: "myField-asc"}

toDataSourceRequestString output : page=1&pageSize=10&group=myField-asc

 

Thanks in advance.

Svet
Telerik team
 answered on 18 Sep 2020
3 answers
682 views

Hi,

I use kendo ui angular pager in my codes. However, [info] and [type] are not working. Please see attached image. 

I want to show xx of total items, and also each page I want to see numeric numbers.

<kendo-datapager
[pageSize]="pageSize"
[skip]="skip"
[total] = "total"
[type] ="numeric"
[info] ="true"
(pageChange)="onPageChange($event)">
</kendo-datapager>

Martin Bechev
Telerik team
 answered on 18 Sep 2020
1 answer
382 views

HI All

 

 In Angular Grid : Can we have grid by default editable instead of clicking .

 

Request you to share the link

 

Regards

Praveen

Hetali
Telerik team
 answered on 18 Sep 2020
1 answer
2.4K+ views

Kendo Angular Grid : Blank space in the end when you resize(reduce) any column.

If column is getting resized then content from the column should get fit with remaining space, but it is showing white space.

You can see the whole data in tool-tip but not in actual column.(PFA for better understanding)

Requesting to provide any solution where huge content will get good fit after resizing the column as well 

Martin Bechev
Telerik team
 answered on 17 Sep 2020
1 answer
343 views
How do I replace the valuenormalizer arrow function with a regular function.whenever I try to change that getting an error.Cannot read property 'lift' of undefined.
Svet
Telerik team
 answered on 17 Sep 2020
1 answer
138 views

 

As you can see in the screenshot its data source has 7 records. The "take" adjusts to the table size. Now it is 5 as I see with break points.

Optically it works fine. But there are 2 errors that do not appear in all my other Kendo Grids.

- This grid does not let me navigate to the second page (and so on).

- It says "1-7" although it actually shows only 1-5 on the first page.

What could cause that?

Martin Bechev
Telerik team
 answered on 17 Sep 2020
0 answers
1.4K+ views

Hi, 

I am getting following exception when I tried to open dialog in agular unit test cases

Exception:

context.js:265 ERROR Error: 
Cannot attach dialog to the page.
Add an element that uses the kendoDialogContainer directive, or set the 'appendTo' property.
See https://www.telerik.com/kendo-angular-ui/components/dialogs/dialog/service/.
          
    at DialogService.open (index.js:1171)
    at EmployeeDetailsComponent.openAddressModal (employee-details.component.ts:19)

 

Details are below: 

1- App Component: 

    <div class="content" role="main">
  <div>
    <h1> Testing Popup Model Testing: </h1> <app-employee> </app-employee>
  </div>
  <div kendoDialogContainer></div>
</div>

2- Employee Component:

<div class="employee">
    <h2> Employee Details: </h2><app-employee-details> </app-employee-details>
</div>

3- Employee Details Component:

<div>
    Ram: <button class="addButton" (click)="openAddressModal(addressDialogContent, addressDialogActions)"> Add Address </button> 
</div>
<ng-template #addressDialogContent>
   Enter the address: <input type="text" id="address"/>
</ng-template>
<ng-template #addressDialogActions>
    <button kendoButton (click)="close()">No</button>
    <button kendoButton (click)="AddAddress();" primary="true">Yes</button>
</ng-template>

4- Employee Details.ts file 

export class EmployeeDetailsComponent implements OnInit {
  currentDialog;
  constructor(private readonly dialogService: DialogService) { }
  ngOnInit(): void { }
  public AddAddress() { this.close(); }
  public close() {  if (this.currentDialog) { this.currentDialog.close(); }
  }
  openAddressModal(contentTemplate: TemplateRef<any>,   actionsTemplate: TemplateRef<any>)
  {
    this.currentDialog = this.dialogService.open({
      title: 'Address',
      content: contentTemplate,
      actions: actionsTemplate,
      minWidth: 350,
      minHeight: 150,
    });
  }

5- Employee details spec.ts file

describe('EmployeeDetailsComponent', () => {
  let component: EmployeeDetailsComponent;
  let fixture: ComponentFixture<EmployeeDetailsComponent>;
  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ EmployeeDetailsComponent ],
      providers: [DialogService, DialogContainerService],
      imports: [CommonModule, FormsModule]
    })
    .compileComponents();
  }));
  beforeEach(() => {
    fixture = TestBed.createComponent(EmployeeDetailsComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });
  it('should open the the address popup model', () => {
    const buttonElement =  fixture.debugElement.query(By.css('.addButton'));
    buttonElement.triggerEventHandler('click', null);
  });
});

P.S: Note: I don’t want to add <div kendoDialogContainer></div> in employee details html file.

Please let me know if anyone need additional information, thanks for you help in advance.

 

 

 

Ram
Top achievements
Rank 1
 asked on 16 Sep 2020
4 answers
442 views

We recently implemented a new color theme and right after release we realized that PDF exports from our reports (courtesy of Kendo's Grid) are exporting with white text, so they cannot be read.

Application details: Large Angular app with a C# backend, all handwritten scss except for our Kendo controls where we lean heavily on Grid and Charts, grid on  our reports is @progress/kendo-angular-grid version 4.6.3, kendo-angular-pdf-export is 2.0.3 (not sure it's used; I don't see a reference, but the name made me think I should list it), Angular is 9.0.2. IDE is VS Code.

Things tried:

  1. https://www.telerik.com/kendo-angular-ui/components/pdfexport/content-styling/ indicated that viewencapsulation must be disabled to support styling of the exported content. This is probably unacceptable for us anyway, but just in case, I tried it and added `kendo-pdf-export { color: #2d313b; }` to our report grid component that calls the save method. Removing view encapsulation resulted in the wrong colors for the report itself and no change to the exported PDF file. I also tried placing the element selector in ::ng-deep instead, to no effect.
  2. I attempted adding `kendo-pdf-export { color: #2d313b; }` to a style tag on the index.html file to make sure it was present, but it wasn't helpful.
  3. I tried replacing all var(--font-color-1) in the styles for our report component with currentColor since someone had a similar issue in https://www.telerik.com/forums/chart-colors-on-pdf-export but that seemed to be specific to charts, and didn't help.
Svet
Telerik team
 answered on 16 Sep 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?