Telerik Forums
Kendo UI for Angular Forum
0 answers
157 views

Hi,

I have an array of ColumnDefinition objects which I am using to populate kendo-grid-columns.

Some columns have a custom row filter, using ng-template and kendoGridFilterCellTemplate.

My users have the ability to change their grid layout, in which case the ColumnDefinitions are updated, re-rendering the kendo-grid-columns. If this happens, any filters in the custom template are lost.

It appears that the 'let-filter' in the ng-template isn't re-binding to the existing column's filter. Is there a way to force this to rebind?

<ng-container *ngFor="let column of columnDefinitions">
    <kendo-grid-column
      *ngIf="column.isReadOnly"
      field="{{ column.systemName }}"
      title="{{ column.displayName }}"
      format="{{ column.format }}"
      [filter]="column.type"
      [width]="column.width"
      [hidden]="column.isHidden"
    >
      <ng-template
        kendoGridFilterCellTemplate
        let-filter
        *ngIf="column.hasFilterList"
      >
        <app-multi-select-filter-component
          [data]="getColumnFilterListValues(column.systemName)"
          [filter]="filter"
          [columnName]="column.systemName"
        ></app-multi-select-filter-component>
      </ng-template>
    </kendo-grid-column>

The column menu filter retains the previously selected value as seen in the attached screenshots.

n/a
Top achievements
Rank 1
 asked on 12 Jul 2023
1 answer
578 views

Hi,

I'm having problem retaining the scroll position when my observable refreshes.

What I have is when a refresh of the observable is triggered the grid is refreshed but jumps to another place in the grid.

This is due to a detail template that I'm using to show data (I expand all the details when the data is loaded). 

If I remove the detail template the scroll position stays at the same position.  But when the detail template is present it looks like the scroll position is set to where the current row would be positioned without a detail template.

Do you have a clue what I'm doing wrong?

Regards,

 

Bram

 

Martin Bechev
Telerik team
 updated answer on 12 Jul 2023
2 answers
2.0K+ views

I have been using the kendo-textarea component, and I saw that it had the functionality to set a default row height, and autosize depending on its contents: https://www.telerik.com/kendo-angular-ui/components/inputs/textarea/sizing/

 

However, I wish to do both. That is, I would like to set my default row height so that row=5, and autosize depending on the contents of the textarea. Is this possible? I tried it out with both my code and editing your autosize example using Stackblitz, however, it doesn't seem to be able to do both:

 

 

Is it possible to do both? Please advise.

 

Many thanks,

Hazel

Hans-Werner
Top achievements
Rank 1
Iron
 answered on 12 Jul 2023
1 answer
141 views

Hello,

Which figma assets fits best as material design kit to design a front made with Kendo web ui for angular?

 

BR/

Mikael

Yanmario
Telerik team
 answered on 11 Jul 2023
0 answers
197 views
According to https://www.telerik.com/kendo-angular-ui/components/editor/styling/#toc-setting-the-height I have to set the [iframe] property to false and disable the ViewEncapsulation. The second one I don't understand. According to https://angular.io/guide/view-encapsulation ViewEncapsulation guarantees that the styles I apply to my component would not propagate to the rest of my application. So in my understanding, if it is enabled, the styles I apply to the Kendo-Angular-Editor inside my component would not propagate beyond that component, that's all. So why do I need to disable it then if I don't care about possible propagation?
Ewgenij
Top achievements
Rank 1
Veteran
 updated question on 10 Jul 2023
0 answers
128 views
Hello everyone, I would like to know how to decrease the separation space between the labels and the graphics (as seen in the image in blue color) It is for not having so much separation between the information and reducing the space that you have


Camilo
Top achievements
Rank 1
Iron
 asked on 07 Jul 2023
0 answers
167 views

Hi,

We have a requirement to be able to filter the list in the list box and move to the other based the filter value.

For example, lets assume the input field is for the right listBox, when we type In, it should list India, Indonesia

 

 

Regards,

Jyothi

Jyothi
Top achievements
Rank 1
Iron
Iron
Veteran
 asked on 07 Jul 2023
0 answers
163 views

I'm looking at the Node Template - TreeView - Kendo UI for Angular (telerik.com) . Trying to figure out how to open a new component / page when clicking on the tree node. Can someone provide an example?

 

Thanks,

Bryian Tan

Patrick
Top achievements
Rank 1
 asked on 06 Jul 2023
1 answer
515 views

Hi guys,
I have used "kendo-toolbar-button" for my toolbar button but recently I got a warning in the console to replace [icon] with [svgIcon].  As I have many pages to modify, I would appreciate it if anybody let me know if there is another method to prevent this modification.

Thanks
Behnam

 <kendo-toolbar-button
                [icon]="'star'"
                [title]="'PROCESSES.FLOWCHART.REMOVE_FAVOURITE' | translate"
                    *ngIf="flowchart?.IsUserFavorite && flowchart?.IsLatest && !flowchart?.IsVisibilityRestricted"
                    (click)="removeFavourite()"
                >
               

</kendo-toolbar-button>

 

Warning message

Kendo UI for Angular: Icon type is set to 'svg', but only font icon name is provided. The "checkbox-checked" font icon will be rendered instead.
progress-kendo-angular-icons.mjs:407 Kendo UI for Angular: Icon type is set to 'svg', but only font icon name is provided. The "printer" font icon will be rendered instead.
progress-kendo-angular-icons.mjs:407 Kendo UI for Angular: Icon type is set to 'svg', but only font icon name is provided. The "star" font icon will be rendered instead.
progress-kendo-angular-icons.mjs:407 Kendo UI for Angular: Icon type is set to 'svg', but only font icon name is provided. The "menu" font icon will be rendered instead.

Hetali
Telerik team
 answered on 06 Jul 2023
0 answers
171 views

Hello,

 

I got a problem with PDF generation with Kendo,


 

Marked columns in red should be staggered on the right side, this data belongs to Homolog Number PH.002.15-O. Because of the break-page marked lines are misaligned

I provide you the html code



<div *ngIf="homologations$ | async as homologations">
<kendo-pdf-export #pdf
    paperSize="A4"
    [keepTogether]="'td'"
    [margin]="{
        top: '2cm', 
        bottom: standard.homologationForm.fields.length > 1 ? '2.5cm' : '4cm', 
        right: '2cm', 
        left: '2cm'
    }"
    [repeatHeaders]="true"
    [landscape]="standard.homologationForm.fields.length > 1"
    class="prevent-split"
>
    <ng-template kendoPDFTemplate let-pageNum="pageNum" let-totalPages="totalPages">
        <div class="top-template">
            <div class="header">
                <span>FIA</span>
                <span>List n&deg;{{ standard.technicalList.number }}</span>
            </div>
        </div>
        <div class="bot-template">
            <span>
                <sup>(1)</sup> The homologation end date represents the final date on which the products may be manufactured
            </span>
            <span>
                <sup>(2)</sup> The validity of the product must always be that which is indicated on the product homologation label.
                The dates in this column are the latest possible dates that can be shown on the homologation label
            </span>
            <span *ngIf="warnings.length > 0">
                <sup>(3)</sup> Please refer to the end of this section
            </span>

            <div class="page-div">
                <span>{{ currentDate | appTechnicalDate:'dd.MM.YYYY' }}</span>
                <span>Page {{ pageNum }} / {{ totalPages }}</span>
            </div>
        </div>
    </ng-template>

    <div class="title-div">
        {{ standard.technicalList.englishTitle }}
    </div>

    <div class="center technical-div">
        TECHNICAL LIST N&deg; {{ standard.technicalList.number }}
    </div>

    <div class="center">
        <img *ngIf="headerPicture" [src]="headerPicture" class="header-picture" [style.max-height]="standard.homologationForm.fields.length > 1 ? '300px' : '400px'" />
    </div>

    <div [innerHtml]="standard.technicalList.linkUrl | appSafeHtml"></div>

    <ng-container *ngFor="let part of standard.parts; let i = index">
        <div *ngIf="part.name !== ''" class="part-infos" [class.page-break]="i > 0">
            <div class="center technical-div">
                {{ part.name }}
            </div>
            <div *ngIf="part.description !== null">
                {{ part.description }}
            </div>
        </div>

        <table class="table-contents">
            <thead>
                <th style="width: 50px;">
                    Homol. number
                </th>
                <th>
                    Brand
                </th>
                <th>
                    Model
                </th>
                <th *ngFor="let field of standard.homologationForm.fields">
                    {{ field.name }}
                </th>
                <th style="width: 35px;">
                    Start of homol.
                </th>
                <th style="width: 35px;">
                    End of homol.<sup>(1)</sup>
                </th>
                <th style="width: 55px;" *ngIf="standard.technicalList.validity">
                    Product valid until<sup>(2)</sup>
                </th>
            </thead>

            <tbody>
                <ng-container *ngFor="let homologation of getHomologationsPart(homologations, part)">
                    <tr [ngClass]="{
                            'row-withdraw': (homologation.withdrawType !== null && homologation.withdrawType.code === withdrawTypesEnum.TotalWithdraw),
                            'row-partial-withdraw': (homologation.withdrawType !== null && homologation.withdrawType.code === withdrawTypesEnum.PartialWithdraw)
                        }"
                    >
                        <td style="width: 50px;"
                            [rowSpan]="homologation.helmetRequests.length + homologation.extensionRequests.length + 1"
                        >
                            {{ homologation.homologationNumber }}
                            <sup *ngIf="homologation.withdrawType !== null">(3)</sup>
                        </td>
                        <td [rowSpan]="
                            homologation.helmetRequests.length +
                            homologation.extensionRequests.length + 1
                        ">{{ homologation.brand }}</td>
                        <td [rowSpan]="
                            homologation.helmetRequests.length +
                            homologation.extensionRequests.length + 1
                        ">
                            <span>{{ homologation.initialRequest.modelName }}</span>
                            <span *ngFor="let request of homologation.changeOfNameRequests">
                                <br />
                                {{ request.modelName }}
                            </span>
                        </td>

                        <td *ngFor="let field of standard.homologationForm.fields">
                            {{ getCustomFieldValue(homologation.customFields, field.name) }}
                        </td>

                        <td style="width: 35px;">
                            {{ homologation.startDate | appTechnicalDate }}
                        </td>

                        <td style="width: 35px;" 
                            [rowSpan]="homologation.extensionRequests.length + 1"
                        >
                            {{ homologation.endDate | appTechnicalDate }}
                        </td>

                        <td style="width: 55px;"
                            *ngIf="standard.technicalList.validity && standard.technicalList.validityDuration"
                            [rowSpan]="homologation.extensionRequests.length + 1"
                        >{{ homologation.endDate.getFullYear() + standard.technicalList.validityDuration }}</td>

                    </tr>

                    <!--tr *ngFor="let request of homologation.extensionRequests"
                        [ngClass]="{
                            'row-withdraw': (homologation.withdrawType !== null && homologation.withdrawType.code === withdrawTypesEnum.TotalWithdraw),
                            'row-partial-withdraw': (homologation.withdrawType !== null && homologation.withdrawType.code === withdrawTypesEnum.PartialWithdraw)
                        }"
                    >
                        <td *ngFor="let field of standard.homologationForm.fields">
                            {{ getCustomFieldValue(request.customFields, field.name) }}
                        </td>
                        <td style="border-right: none;">{{ request.homologationStartDate | appTechnicalDate }}</td>
                    </tr-->

                    <tr *ngFor="let request of homologation.helmetRequests"
                        [ngClass]="{
                            'row-withdraw': (homologation.withdrawType !== null && homologation.withdrawType.code === withdrawTypesEnum.TotalWithdraw),
                            'row-partial-withdraw': (homologation.withdrawType !== null && homologation.withdrawType.code === withdrawTypesEnum.PartialWithdraw)
                        }"
                    >
                        <!--td *ngIf="homologation.homologationNumber === 'PH.003.15-O'"></td>
                        <td *ngIf="homologation.homologationNumber === 'PH.003.15-O'"></td>
                        <td *ngIf="homologation.homologationNumber === 'PH.003.15-O'"></td-->
                        <td *ngFor="let field of standard.homologationForm.fields">
                            {{ getCustomFieldValue(request.customFields, field.name) }}
                        </td>
                        <td>{{ request.homologationStartDate | appTechnicalDate }}</td>
                        <td>{{ request.homologationEndDate | appTechnicalDate }}</td>
                        <td *ngIf="standard.technicalList.validity">{{ request.homologationEndDate.getFullYear() + 10 }}</td>
                    </tr>
                </ng-container>
            </tbody>
        </table>
    </ng-container>

    <div class="warning-title page-break">
        {{ standard.technicalList.englishWarning }}
    </div>

    <p *ngIf="warnings.length === 0">
        There are no warnings for this product
    </p>
    <div class="warning-div" *ngFor="let warning of warnings">
        <div [innerHtml]="warning"></div>
    </div>
</kendo-pdf-export>

 

And the css code 


.table-contents {
    text-transform: uppercase;
    border-collapse: collapse;
    font-size: 8px;
    width: 100%;
    border-spacing: 0 calc(1rem + 2px);
    padding-bottom: 2px;


    page-break-inside: avoid;


    th {
        background-color: #CCC;
        border:1px solid black;
        border-right: none;
        padding:5px;
        text-align: center;
        page-break-inside:avoid;


        &:last-child {
          border-right: 1px solid black;
        }
    }


    tr {

        page-break-inside:avoid;
        //transform: scale(1);
    }

    td {
        border:1px solid #000000;
        border-top: none;
        border-right: none;
        text-align: center;
        padding: 2px;
        page-break-inside:avoid;


        &:last-child {
            border-right: 1px solid black;
        }
    }
}

 

Thanks for you help ! 

 

Regards,

sebastien
Top achievements
Rank 1
 asked on 06 Jul 2023
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?