Telerik Forums
Kendo UI for Angular Forum
1 answer
161 views

The latest version of node_modules/@progress/kendo-angular-scheduler/navigation/focusable.directive.d.ts file has the following import statement:

import { FocusableContainer } from 'src/types/focusable-container';

However, the path is invalid as there is no "src" folder.  I can get it to work if I manually change to ../ instead of src/ but we shouldn't have to be editing NPM package files.


Dimiter Topalov
Telerik team
 answered on 01 Dec 2022
1 answer
124 views

Hi,

Is there a way to prevent this grid filter behavior described in the title? I'll try to illustrate it below:


The filter window closes after letting go of the mouse outside of it, the goal is to keep it open.

Dimiter Topalov
Telerik team
 answered on 01 Dec 2022
2 answers
3.6K+ views
How to restrict to have only interger in kendonumeric text box , do not allow user to enter decimal(.)
Aabhar
Top achievements
Rank 1
Iron
 answered on 01 Dec 2022
2 answers
1.3K+ views

I have the following:

@Component({

  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss'],
  encapsulation: ViewEncapsulation.None,
})
export class AppComponent implements OnInit, OnDestroy {
  constructor(
  [...]
    private internationalization: IntlService,
    public translateService: TranslateService,
 
  ) {
    this.translateService.setDefaultLang('fr');

    (this.internationalizationasCldrIntlService).localeId = this.translateService.currentLang;

 

My question is how do I UNIT-TEST such a component, knowing that actually my test gives me the following

TypeError: Cannot read properties of undefined (reading 'replace')
TypeError: Cannot read properties of undefined (reading 'replace') at CldrIntlService.set localeId [as localeId] (http://localhost:9877/_karma_webpack_/webpack:/node_modules/@progress/kendo-angular-intl/__ivy_ngcc__/dist/fesm2015/index.js:196:30) at new AppComponent (http://localhost:9877/_karma_webpack_/webpack:/Client/app/app.component.ts:89:6) at NodeInjectorFactory.factory (ng:///AppComponent/ɵfac.js:4:10) at getNodeInjectable (http://localhost:9877/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2020/core.mjs:3520:44) at instantiateRootComponent (http://localhost:9877/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2020/core.mjs:12587:23) at createRootComponent (http://localhost:9877/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2020/core.mjs:14090:23) at ComponentFactory.create (http://localhost:9877/_karma_webpack_/webpack:/node_modules/@angular/core/fesm2020/core.mjs:13967:25)

 

and the test is like this:

import { HttpClientTestingModule } from '@angular/common/http/testing';
import { TestBed } from '@angular/core/testing';
import { ReactiveFormsModule } from '@angular/forms';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { RouterTestingModule } from '@angular/router/testing';
import { LayoutModule } from '@progress/kendo-angular-layout';
import { HttpClient } from '@angular/common/http';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
import { TranslateHttpLoader } from '@ngx-translate/http-loader';
import { AppComponent } from './app.component';
import { CoreModule } from './core/core.module';
import { KendoModule } from './shared/kendo.module';
import { AppModule } from './app.module';
import '@progress/kendo-angular-intl/locales/fr/all';
describe('AppComponent', () => {
  beforeEach(async () => {
    await TestBed.configureTestingModule({
      schemas: [CUSTOM_ELEMENTS_SCHEMA],
      imports: [
        HttpClientTestingModule,
        ReactiveFormsModule,
        RouterTestingModule,
        NoopAnimationsModule,
        CoreModule,
        LayoutModule,
        KendoModule,
        AppModule,
        TranslateModule.forRoot({
          loader: {
            provide: TranslateLoader,
            useFactory: (http: HttpClient) => new TranslateHttpLoader(http, '/assets/i18n/', `.json?v=${new Date().getTime()}`),
            deps: [HttpClient]
          }
        })        
      ],
      declarations: [
        AppComponent
      ],
    }).compileComponents();
  });
  it('should create the app', () => {
    const fixture = TestBed.createComponent(AppComponent);
    const app = fixture.componentInstance;
    expect(app).toBeTruthy();
serge
Top achievements
Rank 2
Bronze
Iron
Iron
 answered on 30 Nov 2022
0 answers
171 views
We are facing performance issue for textbox control.
While typing the text if we load multiple controls like 5 grids in a single page, the entered text in a textbox taking too much time to appear. 
the above-mentioned performance issue is only with textbox and text area not with other controls like dropdown, checkbox, grid etc..
 
Thanks in Advance
Thimmappa
Top achievements
Rank 1
 asked on 29 Nov 2022
0 answers
306 views

Hi, 

The grid does not seem to obey date sorting ever since I changed it to the template showed a formatted date string.

Would have thought the sorting would be on the field which is a valid Date type. 

 <kendo-grid-column width="160" field="queuedTime" title="Queued" [filterable]="false" filter="date">
        <ng-template kendoGridCellTemplate let-dataItem>{{ dataItem.queuedTimeString }}</ng-template>
      

</kendo-grid-column>

Jeremy
Top achievements
Rank 1
 asked on 29 Nov 2022
1 answer
243 views

After running this it selects "Mike" but It does not expand. Am I missing anything!!

 

<kendo-treeview
  [nodes]="data"
  textField="text"
  kendoTreeViewHierarchyBinding
  childrenField="items"
  [filterable]="true"
  kendoTreeViewExpandable
  [expandedKeys]="expandedKeys"
  kendoTreeViewCheckable
  [(checkedKeys)]="checkedKeys"
>
</kendo-treeview>



import { Component } from '@angular/core';
import { Observable, of } from 'rxjs';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
})
export class AppComponent {
  title = 'kendo-appx';

  public fetchChildren(node: any): Observable<any[]> {
    //Return the items collection of the parent node as children.
    return of(node.items);
  }

  public hasChildren(node: any): boolean {
    //Check if the parent node has children.
    return node.items && node.items.length > 0;
  }

  public expandedKeys: any[] = ['2', '0', '1', '3'];

  public checkedKeys: any[] = ['2_0_0_1'];

  public data: any[] = [
    {
      text: 'Furniture',
      items: [{ text: 'Tables' }, { text: 'Sofas', items: [{ text: 'Red' }] }],
    },
    {
      text: 'Decor',
      items: [{ text: 'Curtains' }, { text: 'Carpets' }],
    },
    {
      text: 'RH',
      items: [
        {
          text: 'Magdelena',
          items: [
            {
              text: 'Joel',
              items: [
                {
                  text: 'Ashish',
                },
                {
                  text: 'Mike',
                },
              ],
            },
          ],
        },
      ],
    },
  ];
}


Hetali
Telerik team
 answered on 28 Nov 2022
1 answer
273 views

Hi Team,

I am working on the kendo-grid and implement export to excel but issue is that after excel data is visible but button not render on the excel can  you please tell me why button not visible on excel,check below attached stackblitz for reference.i am stuck above issue in last 3 days.please  help me regarding this issue?

 

https://stackblitz.com/edit/angular-ko29cm?file=src%2Fapp%2Fapp.component.ts

 

 

Martin Bechev
Telerik team
 answered on 28 Nov 2022
1 answer
255 views

So I have a grid where only certain rows are selectable via checkbox selection, so only certain rows have checkboxes. With the default styling, when I click on the Select All checkbox, ALL the rows, both those with checkboxes and those without get the highlighted style applied.  Is there any way to only apply the highlight to the checkbox rows?

Svet
Telerik team
 answered on 25 Nov 2022
0 answers
198 views

I have two templates but I need optimize it to one template, the only different of that templates is that one kendo datepicker has more viewing atributes. Is there any way to get one template and for example for one button the kendo datepiker has some atributes and for another clicking button the datepiker has different atributes and everything is on one template? With two templates everything is working fine.

 

 

 


<ul class="list-group">
    <li class="list-group-item flex-fill border-0">  
        <button type="button" class="btn btn-link btn-sm" (click)="generateReportDaily(itemListRef, 'pdf')">PDF</button>
        <button type="button" class="btn btn-link btn-sm" (click)="generateReportDaily(itemListRef, 'csv')">CSV</button>          
        <button type="button" class="btn btn-link btn-sm" (click)="generateReportDaily(itemListRef, 'xlsx')">XLSX</button>
        <button type="button" class="btn btn-link btn-sm" (click)="generateReportDaily(itemListRef, 'txt')">TXT</button>   
    </li>
</ul>

<ul class="list-group">
    <li class="list-group-item flex-fill border-0">
       
        <button type="button" class="btn btn-link btn-sm" (click)="generateReportMonthly(itemListRef1, 'pdf')">PDF</button>
        <button type="button" class="btn btn-link btn-sm" (click)="generateReportMonthly(itemListRef1, 'csv')">CSV</button>
        <button type="button" class="btn btn-link btn-sm" (click)="generateReportMonthly(itemListRef1, 'xlsx')">XLSX</button>
        <button type="button" class="btn btn-link btn-sm" (click)="generateReportMonthly(itemListRef1, 'txt')">TXT</button>
    </li>
</ul>

<ng-template #itemListRef kendoCalendarMonthCellTemplate let-context="cellContext">
    <form>
        
        <div>
            <kendo-datepicker
            [(ngModel)]="reportStartEnd"
            [ngModelOptions]="{standalone: true}">
            </kendo-datepicker>
        </div>
     
        <div>
            <kendo-datepicker
            [(ngModel)]="reportEndDate"
            [ngModelOptions]="{standalone: true}"> 
            </kendo-datepicker> 
        </div>
    </form>
</ng-template>

<ng-template #itemListRef1 kendoCalendarMonthCellTemplate let-context="cellContext">
    <form>
        
        <div>
            <kendo-datepicker
            [(ngModel)]="reportStartDate"
            [ngModelOptions]="{standalone: true}"
            bottomView="year"
            topView="decade"
            format="MMMM yyyy"
            >
            </kendo-datepicker>
        </div>
       
        <div>
            <kendo-datepicker
            [(ngModel)]="reportEndDate"
            [ngModelOptions]="{standalone: true}"
            bottomView="year"
            topView="decade"
            format="MMMM yyyy">
            </kendo-datepicker>
        </div>
    </form>
</ng-template>
Marek
Top achievements
Rank 1
 asked on 24 Nov 2022
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?