Telerik Forums
Kendo UI for Angular Forum
1 answer
110 views

Hi,

We are writing some end to end tests for our application and we wanted to use our custom testing library which utilizes basic HTML & Javascript functionality. We use this library for all our web applications, regardless of the framework it was written in.

We are currently having issues on how to get the value of a Angular UI Kendo Textbox. We can get the element by doing document.querySelector('#myField') and returns the element...


<input _ngcontent-ng-c1188706083="" kendotextbox="" formcontrolname="my_field" type="text" id="myField" 
qa-target
="user-my-field-input" ng-reflect-name="my_field"
class
="ng-untouched ng-pristine ng-valid k-textbox k-input k-input-md k-rounded-md k-input-solid">

Doing document.querySelector('#myField').innerHTML or document.querySelector('#myField').innerText just gives a value of "".

How do I get the value that was entered in the textbox?

Thanks!

PS. This textbox is part of a form and looks like this in the template

<form [formGroup]="theForm" class="k-form">
        <fieldset class="k-form-fieldset">
            <h4 class="k-pb-4">Some Information</h4>

            <div class="name-wrapper k-pb-3">
                <kendo-formfield>
                    <kendo-label for="myField" text="My Field*"></kendo-label>
                    <input
                        kendoTextBox
                        formControlName="my_field"
                        type="text"
                        id="myField"
                        qa-target="user-my-field-input" />
                    <kendo-formerror>My field is required</kendo-formerror>
                </kendo-formfield>

Zornitsa
Telerik team
 answered on 21 Jan 2025
1 answer
58 views

I'm trying to install the Scheduler in an Angular project but I'm getting the following error:

Could not resolve dependency:
@angular/localize@"^19.0.0" from the root project

Conflicting peer dependency: @angular/compiler@19.0.6
node_modules/@angular/compiler
  peer @angular/compiler@"19.0.6" from @angular/localize@19.0.6
  node_modules/@angular/localize
    @angular/localize@"^19.0.0" from the root project

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

 

I did tried with the --legacy-peer-deps flag but no luck. 

Here is the version of what I'm running on my project

Angular CLI: 19.0.6
Node: 22.13.0
Package Manager: npm 11.0.0
OS: win32 x64

 

marco
Top achievements
Rank 1
Iron
 answered on 16 Jan 2025
0 answers
43 views

I have a project with a Kendo angular grid.  The grid is searchable, which is how it will likely be used 99% of the time.  However, when you return all of the raw results, the number of rows goes over 10000.  I noticed that when that happens, the paging controls only display the first four numbers of the starting item number.  So "10401" is appearing as "1040".  Is there a way to fix this? 

I currently just have [pagable] = "true" set on my <kendo-grid> tag--I'm not bringing in those newer paging tags, though I suppose I could if I had to.  My project is Angular 18 and the package of grid I'm using is 17.1.0.

Tom
Top achievements
Rank 2
 updated question on 13 Jan 2025
1 answer
61 views

Setting the initial TreeList selection, or clearing it programmatically, does not seem to update the Select All checkbox.  Is there a way to programmatically do it?
I am using row selection as described in these pages:

https://www.telerik.com/kendo-angular-ui/components/treelist/selection/row-selection#select-all-checkbox

https://www.telerik.com/kendo-angular-ui/components/treelist/selection/persisting#persisting-row-selection-based-on-a-specific-field

Thanks.

Zornitsa
Telerik team
 answered on 13 Jan 2025
1 answer
56 views

I have a flat list of objects that I am grouping for a dropdown list.  The issue is that no matter what, the order of the groups is always in descending order, even if I provide the "dir" sort descriptor.  Please see the following code


//Group departments by user departments and other for easier access on UI
this.departments.forEach(department => {
  department["subCategory"] = this.isMyDept(department.id) ? "My Departments": "Others";
});
this.departmentGrouping = groupBy(this.departments, [
  { field: "subCategory", dir: "asc" },
]) as GroupResult[];

<kendo-dropdownlist
            [(ngModel)]="deptID"
            [data]="departmentGrouping"
            [filterable]="true"
            [showStickyHeader]="false"
            textField="name"
            valueField="id"
            [valuePrimitive]="true"
          >
</kendo-dropdownlist>

When my dropdown is displayed, the "Others" group is always on top.  It doesn't matter if I change the "dir" descriptor to "asc" or "desc" in the groupBy function, nothing changes.  How do I sort the group order so I can have "My Departments" as the top group?

Martin Bechev
Telerik team
 answered on 13 Jan 2025
1 answer
80 views

Hi,

  Can I continue using the Kendo subscription license that I had which is expired now if I don't want to renew it?

Thanks.

Hetali
Telerik team
 answered on 09 Jan 2025
1 answer
65 views

i want to customize kendo-grid by own component . 

i think its only taking columns and i need help to get other things except columns like kendo-grid-checkbox-column, kendo-grid-command-column
https://www.telerik.com/forums/kendo-angular-editor-content-projection-for-custom-toolbar
this comment saying "Content projection is not typically supported in the Grid" so i have problem with it.

i'm using like https://stackblitz.com/edit/angular-7qonm9-7qusje this example.

app-grid-wrapper component
<kendo-grid
[data]="data"
[height]="height"
[loading]="loading"
[resizable]="resizable"
[selectable]="selectable"
[kendoGridSelectBy]="'selectionKeyBy'"
[selectedKeys]="selectedKeys"
(edit)="editHandler($event)"
(remove)="removeHandler($event)"
(cancel)="cancelHandler($event)"
(save)="saveHandler($event)"
(add)="addHandler($event)"
>
<ng-content></ng-content>
<kendo-grid-excel fileName="UserList.xlsx"> </kendo-grid-excel>
</kendo-grid>

 

and using like this other components

<app-grid-wrapper
#grid
[data]="dataService.view$ | async"
[loading]="dataService.pending"
[selectable]="{ mode: 'single' }"
[(selectedKeys)]="selectedItems"
(edit)="editHandler($event)"
(remove)="removeHandler($event)"
(cancel)="cancelHandler($event)"
(save)="saveHandler($event)"
(add)="addHandler($event)"
[resizable]="true"
nesAutoHeight

>

<kendo-grid-checkbox-column [width]="40" showSelectAll="true"></kendo-grid-checkbox-column>
<kendo-grid-column nesField="licenseCode">
<ng-template kendoGridEditTemplate let-column="column" let-formGroup="formGroup" let-isNew="isNew">
<input nesFormControl [readonly]="!isNew" [formControl]="formGroup.get('licenseCode')" />
</ng-template>
</kendo-grid-column>
<kendo-grid-column nesField="name">
<ng-template kendoGridCellTemplate let-dataItem>
<div class="">
<a style="color: #4e61ec" href="javascript:;" (click)="moreHandler(dataItem)"> {{dataItem.name}} </a>
</div>
</ng-template>
</kendo-grid-column>
<kendo-grid-column nesField="name2"></kendo-grid-column>
<kendo-grid-column nesField="licenseType">
<ng-template kendoGridEditTemplate let-column="column" let-formGroup="formGroup" let-isNew="isNew">
<kendo-dropdownlist
[formControl]="formGroup.get(column.field)"
[valuePrimitive]="true"
[dictCode]="'LCNS001'"
></kendo-dropdownlist>
</ng-template>
<ng-template kendoGridCellTemplate let-dataItem>
{{ dataItem.licenseType }} - {{ dataItem.licenseTypeName }}
</ng-template>
</kendo-grid-column>
<kendo-grid-column nesField="status">
<ng-template kendoGridEditTemplate let-column="column" let-formGroup="formGroup" let-isNew="isNew">
<kendo-dropdownlist
[formControl]="formGroup.get(column.field)"
[valuePrimitive]="true"
[dictCode]="'LCNS002'"
></kendo-dropdownlist>
</ng-template>
<ng-template kendoGridCellTemplate let-dataItem> {{ dataItem.statusName }} </ng-template>
</kendo-grid-column>
<kendo-grid-column nesField="sysNo">
<ng-template kendoGridEditTemplate let-column="column" let-formGroup="formGroup" let-isNew="isNew">
<kendo-dropdownlist
[formControl]="formGroup.get(column.field)"
[valuePrimitive]="true"
[dictCode]="'LCNS008'"
></kendo-dropdownlist>
</ng-template>
</kendo-grid-column>
<!-- <kendo-grid-excel fileName="licenseList.xlsx"></kendo-grid-excel>
<kendo-grid-pdf fileName="LicenseList.pdf"></kendo-grid-pdf> -->
<kendo-grid-command-column title="" [width]="220">
<ng-template kendoGridCellTemplate let-formGroup="formGroup">
<button kendoGridEditCommand class="k-secondary">
<i class="nes-i-edit"></i>
</button>
<button kendoGridRemoveCommand class="k-secondary">
<i class="nes-i-delete"></i>
</button>
<button kendoGridSaveCommand [disabled]="formGroup?.invalid">
<i class="nes-i-save"></i>
</button>
<button kendoGridCancelCommand><i class="nes-i-cancel"></i></button>
</ng-template>
</kendo-grid-command-column>
</app-grid-wrapper>

 but first thing is other than kendo-grid-column are not working. 

so getting columns like this

@ContentChildren(ColumnComponent) private columns: QueryList<ColumnComponent>;
ngAfterViewInit() {
this.grid.columns.reset(this.columns.toArray());
}

 

Yanmario
Telerik team
 updated answer on 09 Jan 2025
1 answer
258 views

I want to configure a custom button for the editor toolbar as described here https://www.telerik.com/kendo-angular-ui/components/toolbar/custom-control-types/  However, the button should not always be there, depending on in which other component the editor is used. So, I wanted to approach the issue by using content projection with ng-content. I implemented the custom button and placed ng-content tag into the kendo-editor definition. However, when I try to project the custom button to the editor it does not work. The button is absent.

Below my editor implementation in an own component "my-editor".

<kendo-editor #editor
              [placeholder]="placeholder"
              [(ngModel)]="content"
              [iframe]="false"
>
  <kendo-toolbar>
    <kendo-toolbar-buttongroup>
      <kendo-toolbar-button kendoEditorBoldButton></kendo-toolbar-button>
      <kendo-toolbar-button kendoEditorItalicButton></kendo-toolbar-button>
      <kendo-toolbar-button kendoEditorUnderlineButton></kendo-toolbar-button>
    </kendo-toolbar-buttongroup>
    <ng-content></ng-content>             <!-- The place where the custom buttons should be inserted -->
  </kendo-toolbar>
</kendo-editor>

I inject the custom button like that

<my-editor>
  <custom-button></custom-button>
</my-editor>

Yanmario
Telerik team
 updated answer on 09 Jan 2025
0 answers
25 views
Grid grouping only shows groups that appear in data.  How can I tell the grid all of my group by values.  I need to be able to show a group header and tell the user there are no records.
Brad
Top achievements
Rank 1
Iron
 asked on 08 Jan 2025
1 answer
85 views
Hello.  I'm not using a kendo form here, so that may well be my issue.  I have constructed a kendo-dialog window to add or edit an object using kendo inputs--primarily text boxes with a couple of dropdowns and a checkbox.  When editing I want the fields to display the current variable value.  I'm binding with [(ngModel)].  The problem is that when I open an edit window, those values don't display until I click on each field (bring them into focus).   Is there a way to get these to display?  Thanks.
Yanmario
Telerik team
 answered on 02 Jan 2025
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?