Telerik Forums
Kendo UI for Angular Forum
1 answer
588 views

Hi,

Recently upgraded the angular project from 8 to 10. After the upgrade we noticed in master details grid details grid template which is in expanded mode is not refreshing while we invoke parent grid refresh. It was invoking the detail template ng onint in earlier version of angular. we are forced to collapse and expand to make the refresh happen. Is there any additional property missing in new angular/kendo version.

Angular Version -  "@angular/core": "10.2.0",

Angular Grid Version - "@progress/kendo-angular-grid": "4.8.0",

 

Thanks

Rajeev

Svet
Telerik team
 answered on 26 Nov 2020
1 answer
2.1K+ views

hi, how can i print key and value of object inside template?

The template is 'kendo chart series item tooltip'

 

My html

<kendo-chart-series-item-tooltip>
            <ng-template let-value="value" let-category="category" let-series="series" let-dataItem="dataItem">
                    <div *ngFor="let item of dataItem.subObject| keyvalue">
                                {{item | json}}<br/>
                                Key:{{item.key}} and Value:{{item.value}}
                                <br/><br/>
                    </div>
            </ng-template>
</kendo-chart-series-item-tooltip>

 

My json:

[{
     
    "id": "1Period",
    "subObject": [{"Alex":"10"},{"Mathew":"5"}],
},

{

    "id": "2Period",
    "subObject": [{"Alex":"2"},{"Mathew":"50"}],
}

 

This code doesn't work and it return this error:

Uncaught Error: Template parse errors:
The pipe 'keyvalue' could not be found ("ue" let-catego

 

Svet
Telerik team
 answered on 26 Nov 2020
4 answers
349 views

Hi,

I am following the example here: https://www.telerik.com/kendo-angular-ui/components/grid/how-to/persist-state/
First of all the hidden is missing from column-settings.interface.ts.

Since I wanted to use more attributes like we can do when using  kendo-grid-column I changed the columnsConfig: ColumnSettings[]; to columnsConfig: any[]; into grid-settings.interface.ts 

 

I have severl date fields coming from my response in the following format: 2020-06-22T00:00:00
When I was using the HTML and kendo-grid-column with the following example I could get them formatted as I wanted:

<kendo-grid-column
          field="startDate"
          title="Start Date"
          [width]="120"
          filter="date"
          [hidden] = "true">

          <ng-template kendoGridCellTemplate let-dataItem>
            {{dataItem.startDate | date: 'dd/MM/yyyy'}}
          </ng-template>
        </kendo-grid-column>

Now that I had to move the logic into the component to be able to have persistent grids I am trying several format, but none seems to work:

columnsConfig: [{
            field: 'startDate',
            title: 'Start Date',
            filterable: true,
            filter: 'date',
            format: '{0:d}',
            hidden: true,
            width: 120
        } ]

And secondary how can I also add an action column in the begining of my grid with view, edit, delete icons as I did before in the html with the following code:

 <kendo-grid-column field="{{'common.actions' | translate}}" width="120">
          <ng-template kendoGridCellTemplate let-project let-isNew="isNew">
            <div class="action-buttons">
              <button title="{{'common.displayInfo' | translate}}"><i class="fa fa-info"></i></button>
              <button routerLink="/project/{{project.id}}/view"><i class="fa fa-search"></i></button>
              <button kendoGridEditCommand><i class="fa fa-pencil"></i></button>
              <button kendoGridRemoveCommand><i class="fa fa-trash"></i></button>
            </div>
          </ng-template>
</kendo-grid-column>
How can I write the same in my component!?!? I tried using template there without any luck.

Thank you.

Martin Bechev
Telerik team
 answered on 26 Nov 2020
1 answer
5.6K+ views

Hi Team,

 

Kendo Angular Grid --> How to Export the entire records to excel instead of page level

I have Kendo Angular gird and Export to Excel option as well, while doing export to excel it is download only current page not entire records.

Can you please guide me how to download export to excel with entire records?

 

Note: if I select page size manually to 1000 (example) download all the records, here our requirement is while clicking on Export to excel itself download all records.

Thanks,

Sankar

 

Martin Bechev
Telerik team
 answered on 26 Nov 2020
1 answer
482 views

On selecting a panel bar item I am opening up a modal which in turn returns back a true or false.if true I am displaying the new item .if false I am staying on the previous item.but in case of false scenario even if I am staying at the previous item, as the next item was clicked ,the focused and selected property of that item is getting set to true and that of the previous item to false.how do I revert the selected and focused property if I don't display the itemcontent even if the user clicks on it.

Martin Bechev
Telerik team
 answered on 26 Nov 2020
1 answer
86 views

Greetings.
Globalization functionality has been added in a project I am working on.During development, it was discovered that the Portuguese locale ("pt-pt") is not using the correct format for decimals. According to https://en.wikipedia.org/wiki/Decimal_separator, portuguese format should be "1 234 567,89", but the format looks like this "1.234.567,89". Looks like Brazilian format ("pt") is being used instead of Portuguese ("pt-pt").

Stackblitz example with kendo-numerictextbox : https://stackblitz.com/edit/angular-grmrwk?file=app/app.module.ts

Can you please clarify if this is normal behavior?
Thank you.

Dimiter Topalov
Telerik team
 answered on 25 Nov 2020
1 answer
202 views

In jQuery kendo grid we were able to set the default filters from filterable operators.
https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/filterable.operators.date

With that we could set all the date filters search for a range from one date to another

I am trying to do the same from the directive (and not from the HTML, so please try to answer for that) with something like this:

 gridSettings: GridSettings = {
        state: {
            skip: 0,
            take: 10,
            // Initial filter descriptor
            filter: {
                logic: 'and',
                filters: []
            }
        },
        columnsConfig: [
 {
            field: 'publicationDate',
            title: this.translateService.instant('legislation.publication_date'),
            filterable: [{ operator: 'gte' }, { operator: 'lte' }],
            filter: 'date',
            format: '{0:dd/MM/yyyy}',
            type: 'date',
            hidden: false,
            width: 120
        }
...
I tried on  filterable of the column but I also tried on the general  filter: { filters: [ ... ] } without success.

1) Does Angular KendoGrid support this to set the default criteria for the filters for each column or type like jQuery filterable operators (string, number, date) ?

 

2) And a second question regarding this european format I am using for the dates on my date columns. When I apply a filter like I am doing in the attached screenshot, it's not working

Dimitris
Top achievements
Rank 1
Veteran
 answered on 25 Nov 2020
2 answers
191 views

Hi,

Is there any idea why the angular treeview control is behaving like this which searching in the attached image.

 

Used the below code to search the treeview

https://www.telerik.com/kendo-angular-ui/components/treeview/how-to/filtering/

 

Html Treeview

 <kendo-treeview
    [nodes]="publishedKnowledgeAccounts"
    [children]="children"
    [hasChildren]="hasChildren"
    textField="Title"
    [isExpanded]="isExpanded"
    [isChecked]="isChecked"
    (checkedChange) = "checkedChange($event)"
    (collapse)="handleCollapse($event)"
    (expand)="handleExpand($event)"
    [kendoTreeViewCheckable]="checkableSettings"
    [(checkedKeys)]="checkedKeys"
>
</kendo-treeview>

Thanks

Rajeev

 

Rajeev
Top achievements
Rank 1
 answered on 24 Nov 2020
1 answer
86 views
I'm currently using the jQuery DropDownTree since this component is not yet available in the Kendo Angular library. However, I need to create multiple DropDownTree components dynamically in an *ngFor loop in the template. I'm not sure how to do that since initializing a DropDownTree requires you to explicitly specify the element that will host it. Is this possible with DropDownTree?

I had originally created a support ticket for this but was told to ask here instead.
Martin Bechev
Telerik team
 answered on 24 Nov 2020
1 answer
1.6K+ views

Hi,

I am trying to use a kendo-formfield that contains a list of radio buttons that are dynamically generated by an ngFor. But it errors out with: 

The `kendo-formfield` component should contain only one control of type NgControl with a formControlName.

If I define the radio buttons statically in the html template then it works. So I think this is a bug.

 

Doesn't work:

  <kendo-formfield>
    <kendo-label text="Document type"></kendo-label>
    <ul class="k-radio-list">
      <li class="k-radio-item" *ngFor="let documentType of documentTypes">
        <input type="radio" #documentType [value]="documentType.id" kendoRadioButton formControlName="documentType" />
        <kendo-label class="k-radio-label" [for]="documentType" [text]="documentType.name"></kendo-label>
      </li>
    </ul>
    <kendo-formerror>This field is required</kendo-formerror>
  </kendo-formfield>

 

Works:
  <kendo-formfield>
    <kendo-label text="Document type"></kendo-label>
    <ul class="k-radio-list">
      <li class="k-radio-item" >
        <input type="radio" #documentType1 value="documentType1" kendoRadioButton formControlName="documentType" />
        <kendo-label class="k-radio-label" [for]="documentType1" text="documentType1"></kendo-label>
      </li>

      <li class="k-radio-item" >
        <input type="radio" #documentType2 value="documentType2" kendoRadioButton formControlName="documentType" />
        <kendo-label class="k-radio-label" [for]="documentType2" text="documentType2"></kendo-label>
      </li>
    </ul>
    <kendo-formerror>This field is required</kendo-formerror>
  </kendo-formfield>

 

 

Of course we want dynamic data instead of hardcoded values! So can this please be fixed?

Svet
Telerik team
 answered on 24 Nov 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?