Telerik Forums
Kendo UI for Angular Forum
3 answers
634 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
368 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.3K+ 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
297 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
113 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
380 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
2 answers
722 views
I am using an angular-kendo-grid (version 6.14.5) in angular 10.0.3 with a kendoGridCellTemplate to show details.
<kendo-grid #KendoGrid
 [data]="gridSettings.gridView"
 (...)
>
 <kendo-grid-column
   field="code"
   title="code"
 >
 (...)
 <ng-template kendoGridCellTemplate let-dataItem>
    <details-component
      [id]="dataItem.Id"
      (onDelete)="onDelete($event)">
    </details-component>
 </ng-template>
 (...)
</kendo-grid>

The details component has a "Remove" button that is supposed to remove all details for that master row. When the button is pressed, the 'onDelete()' event is emitted back to the masterComponent and the masterComponent removes the row from it's datasource.
onDelete(deletedRowId: number): void {
   this.rows = this.rows.filter(r => r.id !== deletedRowId.id);
 
   this.loadGridResult();
}
 
loadGridResult(): void {
  this.gridSettings.gridView = {
    data: orderBy(this.rows, this.gridSettings.sort)
      .slice(this.gridSettings.skip, this.gridSettings.skip + this.gridSettings.pageSize),
    total: this.rows.length
  };
}

On screen the row is removed from the table and the next row is expanded (I asume this happens since the row with this index used to be expanded), but the details for the already removed row are still shown. This means that now the table shows a row with incorrect details. The shown details do not belong to this row. I don't think this should ever happen!

The attached images show what I mean. First before any button is clicked an then after clicking on Remove in the details of row 2: 
If the Remove button is clicked again the page crashes as it tries to remove something that was already removed. If any row with now corrupt details is collapsed and again expanded the correct details are loaded.
It seems like the details of row 2 are incorrectly kept in memory or something. Can I do something to solve that?
Can someone explain what is going on here and why this doesn't work as I expect? What can I do to fix this?

I asked the same question on SO here but did not get any response yet. Thanks in advance..

Fuzzy
Top achievements
Rank 1
 answered on 15 Sep 2020
1 answer
100 views
Is there any way to adjust the identation of children rows in the TreeList hierarchy? I didn't find any appropriate TreeList attribute for that.
Svet
Telerik team
 answered on 15 Sep 2020
2 answers
305 views

Hi,

I want to activate to copy numerictextbox value content, when user double click and component is disabled. How can I do?

I try to add some properties to input tag, but does not work.

input {
 user-select: text;
-webkit-user-drag: none;
}

https://www.telerik.com/kendo-angular-ui/components/inputs/numerictextbox/disabled-state/#toc-disabled-numerictextbox

nevra
Top achievements
Rank 1
 answered on 11 Sep 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?