Telerik Forums
Kendo UI for Angular Forum
1 answer
347 views

We are looking for a way to detect when a user causes a column to be auto-fit by double-clicking between column headers.

For some background, we are adding a feature to our app that will remember column widths when the user manually resizes columns so they have the same width when they come back to the app later.  We can use the columnResize event to be notified when a user resizes the columns to a specific width and that works well in many cases. 

However, when a user double clicks between column headers to have the column auto-fit, we haven't been able to distinguish that operation from the user manually sizing a column (at least, we haven't found a *clean* solution that works).  We want to know when the user does the auto-fit because we want to throw away the saved column width for the column so the next time the user loads the app, the column goes back to auto-fit mode instead of having a hard-coded width.

Yanmario
Telerik team
 answered on 15 Feb 2022
0 answers
119 views

Hi,

 

Currently i have an datepicker with an FormControl, but when i assign values of form to object and send it to back, dateFormat is not valid because there is timeZone.

Could i avoid to havetimezone in datepicker field ?

Regards

I hace tried without succes format and tried to an old stackblitz with directive https://kendo-angular-shortdates.stackblitz.io

Masip
Top achievements
Rank 1
Iron
 asked on 15 Feb 2022
0 answers
339 views

Good day,

I need to customize the grid output during PDF export, but it is not clear to me how to do this. All the sample show how to add header/foorter, but I need to change what/how the grid is drawing. 

For example, remove any row background colors, sep lines, font size, etc.

Any examples around of how I might do this?

Thank you!

Tyler
Top achievements
Rank 1
Iron
 asked on 14 Feb 2022
0 answers
113 views
0

The below is the code I have used to populate the Kendo-Grid with Observable<GridDataResult>

<kendo-grid [data]="usersDataView | async" [height]="425" [pageSize]="pageSize" [skip]="skip"
        [pageable]="true" [kendoGridBinding]="data" (pageChange)="onPageChange($event)" [sort]="state.sort"
        (selectionChange)="selectionChanged($event)" [groupable]="false" [group]="state.group" [columnMenu]="true"
        [resizable]="true">
<kendo-grid-column showSelectAll="true" [width]="60" [minResizableWidth]="60">
    <ng-template kendoGridHeaderTemplate let-column let-columnIndex="columnIndex">
      <input type="checkbox" (click)="SetAllSelected($event)" />
    </ng-template>
    <ng-template kendoGridCellTemplate let-dataItem>
      <input type="checkbox" [checked]="dataItem.selected"
        [attr.disabled]="dataItem.deviceName !== null  ? true : null" (click)=SetSelectedItem(dataItem) />
    </ng-template>
  </kendo-grid-column>
  <kendo-grid-column field="userName" title={{translations.USER_NAME}} filter="text" [filterable]="true"
    headerClass="kendoColumn">
    <ng-template kendoGridCellTemplate let-dataItem>
      <a *ngIf="dataItem.userStatus === 0"
        [routerLink]="['/users/details/'+dataItem.userd]">{{dataItem.userName}}</a>
      <span *ngIf="dataItem.userStatus === 1">{{dataItem.userName}}</span>
    </ng-template>
  </kendo-grid-column>
</kendo-grid>

When I run the App, it populates the Grid with Empty rows but equals to the no. of records in the data. I am finding difficulty in mapping the columns to the Grid.

What change I have to do with usersDataView collection and populate the data in the Grid?

CPK
Top achievements
Rank 1
 asked on 14 Feb 2022
1 answer
93 views

Hi!

I'm implementing feature to persist state of grid defined by users and having issue with reorder. The only solution I've found is that. But *ngFor is not very convenient for us because we have a lot of custom templates for columns.  Is there an option to specify column index in html? 

Thank you.

Martin Bechev
Telerik team
 answered on 14 Feb 2022
0 answers
82 views

Hi,

With Kendo Jquery i could format like seeing in image, but in TimePicker i could not?

How could i have same view ?

 

Regards

Masip
Top achievements
Rank 1
Iron
 asked on 14 Feb 2022
1 answer
362 views

Good morning,

I am using treeview to display a list and it's children underneath. I want to implement the drag and drop functionality, soI can reorder the list.

I have 2 questions regarding the drag and drop functionality

 

1. How do I keep track of the order, to initially save, but to reinstate it, after i revisit the list ?

Right now I keep track of parent Id's per item. But if I want to reorder the children under it's parent .. it always reorders them by Id.

 

2.  I was wondering how do I expand a parent when hovering over a parent in the list

When starting to drag a list item ... I want to insert it into a parent .. the parent just stays closed. Is there  a way to expand the parent on hover?

 

Thank you for the help up front

Svet
Telerik team
 answered on 11 Feb 2022
1 answer
164 views

Hi,

I am trying to open a KendoUI WIndow in the maximized state, or to set the state on the window programmatically, but nothing worked - the state on the Kendo window object is still "default".

Here is that I have tried until now:

window.state = "maximized";
window.stateChange.next("maximized");
window.titleBarView.service.maximizeAction();
import { WindowService } from '@progress/kendo-angular-dialog';

export class MyWindowComponent {
   constructor(private windowService: WindowService){}

   public openWindow() {
      this.windowService.open({
         content: MyModalComponent,
	 title: 'Modal Form View',
	 resizable: true,
	 height: 500,
	 width: 600,
	 top: 100,
	 left: 200,
	 state: 'maximized'
      });
   }
}

Am I setting the state the correct way?

Or is there any other way I could achieve this?

 

Best regards,

Mike Fechner

Valentin
Telerik team
 answered on 10 Feb 2022
1 answer
539 views

I'm a beginner and i tried to create a pie chart using json data. but this code does not shows any error and it does not show the chart also.

component.ts file is here

 

 import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
  export class pieData {
  constructor(
    public kind: string,
    public share: number,
  ) {}
}

@Component({
  selector: 'app-pie-chart',
  templateUrl: './pie-chart.component.html',
  styleUrls: ['./pie-chart.component.css']
})
export class PieChartComponent implements OnInit {

  pieData: pieData[];
  constructor(private httpClient: HttpClient) {}
      ngOnInit() {
    this.getpieData();
  }
      getpieData() {
        this.httpClient.get<any>('../db.json').subscribe(
      Response => {
        console.log(Response);
        this.pieData = Response;
      }
    );

    console.log(this.pieData);
  }
}

 

component.html file is here

<kendo-chart [transitions]="false" [style.height]="'100%'" [style.width]="'100%'">
  <kendo-chart-tooltip format='{0}%'></kendo-chart-tooltip>
  <kendo-chart-series>
    <kendo-chart-series-item type="pie"
                             [data]="pieData?.pieData"
                             categoryField="kind"
                             field="share"
                             *ngIf="pieData">
      <kendo-chart-series-item-labels [align]="labelAlign"
                                      color="#000"
                                      [content]="labelContent">
      </kendo-chart-series-item-labels>
    </kendo-chart-series-item>
  </kendo-chart-series>
  <kendo-chart-legend [visible]="false"></kendo-chart-legend>
</kendo-chart>

 

db.json file is here

"pieData": [ { "id": 1, "kind": "Solar", "share": 5 }, { "id": 2, "kind": "Wind", "share": 2 }, ]

 

Martin Bechev
Telerik team
 answered on 09 Feb 2022
1 answer
248 views

Hi

 

Could i select or disable an "kendo-tabstrip-tab" by name or not with index number ?

 

Regards

Martin Bechev
Telerik team
 answered on 09 Feb 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
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
Iron
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?