Telerik Forums
Kendo UI for Angular Forum
0 answers
46 views
Hello, I would like to disable the tab in the date timepicker but i could not find any options to pass in the kendo-datetimepicker component


and maybe replace it with something else. Something like this:

Can you please tell me if it is possible?
Utsav
Top achievements
Rank 1
 updated question on 20 Aug 2024
1 answer
69 views

When using kendo line charts with small datasets I am able to view the correct labels on the chart (first picture attached). My data has a date and a number value. However my data set can be as small as 0 and be as large as 10,000 data points in some cases. At 600 datapoints, the labels on my chart are defaulted to "00:00" (second picture attached).

I would like to make the labels on my chart as dynamic as I can keeping in mind the range of data I could have. Is this possible and how can I do this?

The html code for my chart looks like the following: 

<kendo-chart
        (render)="onRender($event)"
        #metricChart
        renderAs="canvas"
        [pannable]="{ lock: 'y' }"
        [zoomable]="{ mousewheel: { lock: 'y' }, selection: { lock: 'y' } }"
        style="height: 300px"
      >
        <kendo-chart-value-axis>
          <kendo-chart-value-axis-item
            [majorUnit]="25"
            [max]="100"
            [min]="0"
            type="numeric"
            [majorGridLines]="{ dashType: dashType }"
            name="valueAxis"
          >
          </kendo-chart-value-axis-item>
        </kendo-chart-value-axis>

        <kendo-chart-category-axis>
          <kendo-chart-category-axis-item
            [labels]="{ format: 'HH:mm', rotation: 'auto' }"
            type="date"
            [majorGridLines]="{ dashType: dashType }"
            name="categoryAxis"
            [justified]="true"
            [minorTicks]="{step:10}"
          >
          </kendo-chart-category-axis-item>
        </kendo-chart-category-axis>

        <kendo-chart-area *ngIf="hasActiveAlarm" background="#ffedf0"></kendo-chart-area>

        <kendo-chart-series>
          <kendo-chart-series-item
            [data]="metricsData"
            [markers]="{ visible: false }"
            [style]="lineStyle"
            color="#0e893f"
            type="line"
            field="Value"
            categoryField="MetricDate"
          >
          </kendo-chart-series-item>
        </kendo-chart-series>

        <kendo-chart-tooltip>
          <ng-template kendoChartSeriesTooltipTemplate let-category="category" let-value="value">
            {{ category | date: 'medium' }} : {{ value }}
          </ng-template>
        </kendo-chart-tooltip>
      </kendo-chart>

Stephanie
Top achievements
Rank 2
Iron
 answered on 20 Aug 2024
0 answers
42 views

Hello,

Im using angular 16 and .net core 7 version. When i send request to back-end, i can handle. But i have a problem.

Let's assume we have two tables: roles and users. In Angular, there's a grid where I display the roles. I'm having issues on the backend side when applying filtering in that grid.

 <kendo-grid-column [width]="300" title="Rol" [sortable]="cantFilterandSort" field="Roles">
            <ng-template kendoGridFilterCellTemplate let-filter let-column="column">
                <kendo-multiselect [checkboxes]="true" [autoClose]="false" [tagMapper]="tagMapper"
                    [data]="this.roleList" textField="name" valueField="idx"
                    [valuePrimitive]="true"  (valueChange)="onRoleFilterChange($event)"></kendo-multiselect>
            </ng-template>
        </kendo-grid-column>

onRoleFilterChange(selectedRoles: any[]): void {
    this.state.filter = {
      logic: 'and',
      filters: selectedRoles.map(role => ({
          field: 'Roles',
          operator: 'eq',
          value: role
      }))
  };
    this.getAllData();
  }

The request is reaching the back-end.

[HttpPost]
public async Task<IActionResult> GetAllUser([DataSourceRequest] DataSourceRequest filter)
{
    var result = await this.userService.GetAllUser(filter);
    return CreateActionResultInstance(result);
}
public async Task<DataSourceResult> GetAllUser(DataSourceRequest filter)
{

    var result = await entity
          .AsNoTracking()
          .IgnoreQueryFilters()
          .Include(y => y.Roles)
          .Select(x => new UserViewModel
          {
              Idx = x.Idx,
              Email = x.Email,
              Name = x.Name,
              Phone = x.Phone,
              Surname = x.Surname,
              UserName = x.UserName,
              Roles = x.Roles.Select(x => x.Idx)
          }).ToDataSourceResultAsync(filter);
    return result;}

What I need here is for the filtering to work when a role is selected as a filter in the user list on the screen. How can we use a many-to-many table in this case? I researched a lot but couldn't find anything online.

As a note, the IDs of the roles are of type GUID.

Thanks :)

Ingenico
Top achievements
Rank 1
 asked on 20 Aug 2024
0 answers
34 views

I had the same problem as the one that was opened in git: 
https://github.com/telerik/kendo-angular/issues/889

Using the example that user "dtopalov" left
https://www.telerik.com/kendo-angular-ui/components/grid/selection/persisting/#toc-with-virtual-scrolling


The provided event (selectionChange) does not provide the rows that were deselected.

I changed the pagesize to 10 and when I select item 1, 3, 4 and 6 (all items using "ctrl") the event returns correctly, but if I scroll down and select an item by pressing "shift" the grid will deselect items 1, 3 and 4 and the event does not return items unchecked in the event.
And I need to get this information because I need to emit the rows that are not selected. How can I get the items that have been deselected?

I put a gif with the example:
https://cdn.discordapp.com/attachments/1215659099467808849/1275169938834849864/kendofu.gif?ex=66c4ea0c&is=66c3988c&hm=e1c9a362fe115d0e2e8eed242c6f7002f71e770729412d5e5eaaafa80ea9dbdd&

stackblitz:
https://stackblitz.com/run/?file=src%2Fapp%2Fapp.component.ts

josé
Top achievements
Rank 1
 asked on 19 Aug 2024
1 answer
75 views

Hey there,

I have a line chart with invisible markers.
The marker (and therefor the tooltip) should only appear when hovered or touched, which it does so far.

But for a touchscreen device the hitbox to trigger the tooltip on a marker that is not visible seems very small, so one has to be very exact in hitting the line, for me it usually takes 2 or 3 times to hit it correctly. Is there any possibility to increase the hitbox without showing and / or increasing the marker size? I found out increasing the marker size without showing the markers does not help either.

I tried various css modifications for k-marker something along these:

.k-marker {
margin: 20px !important;
background-color: yellow !important;
padding: 50px !important;
border: 2px solid red !important;
}

to get any visual representation or feedback, but nothing seems to work.

I am aware that I can increase line thickness, but visually this is not an option.

On a different note, once I hit one point, it seems easier to hit another point on that line. It seems somehow there is an "active" line, is it possible to preselect the "active" line to get a workaround?

Am I missing something?
Any help is appreciated.
Best regards,

Leo

Leo
Top achievements
Rank 1
Iron
 answered on 15 Aug 2024
0 answers
97 views
Hi,

I am using Kendo-dialog in angular project page. In html I have a table with rows that loads data as objects array with each object bound to row.

 <table class="table table-hover table-sm table-striped" style="width:75%;">
   <thead>
     <tr>
       <th scope="col"></th>
       <th scope="col"></th>
       <th scope="col">Name</th>
       <th scope="col">Description</th>
       <th scope="col">Date</th>
       <th scope="col">Day of Week</th>
     </tr>
   </thead>
   <!--write the data rows-->
   <tbody>
     <tr *ngFor="let h of hl" style="padding:0px" class="{{h.RowClass}}">
       <th scope="row"><span class="fas fa-edit" style="padding-left:10px" (click)="editDialog(h)" *ngIf="isAd" title="Edit this h"></span>
       <th scope="row"><span class="fa fa-trash" style="padding-left:10px" (click)="deleteDialog(holiday)" *ngIf="isAdmin" title="Delete this holiday"></span></th>
       <td><em *ngIf="h.Historical" style="color:#C8C8C8">{{h.Name}}</em><span *ngIf="!h.Historical">{{h.Name}}</span></td>      
     </tr>
   </tbody>
 </table>

dialog looks like this.
<kendo-dialog title="Edit H" *ngIf="showEditDialog" (close)="cancelUpdate()" [minWidth]="250" [width]="450">
  <form #form="ngForm">
    <div class="row vcenter form-group m-1">
      <div class="col-4">Title:</div>
      <div class="col-8 vcenter">       
        <input class="form-control" style="height:30px"
               required name="editTitle" id="editTitle" #name="ngModel" [(ngModel)]="this.editH.Name" type="text" />
        <span class="fa fa-asterisk vcenter" style="color:red; padding-left:5px; font-size:12px" *ngIf="!name.valid && !name.pristine"></span>
      </div>
    </div>
   .......
  </form> 
  <kendo-dialog-actions>
    <button kendoButton (click)="updateH()" primary="true" [disabled]="!form.valid">Save</button>
    <button kendoButton (click)="cancelUpdate()">Cancel</button>
  </kendo-dialog-actions>
</kendo-dialog>


TypeScript Code:
EditDialog(h: Holiday)
{
this.editholiday = h;
}

update(){
//data service layer call by passing this.editholiday object
//refresh main page table rows
}

When I edit data like Name in Dialog, as I am type letters, main html page table row column gets updated. I do not want main table data to get updated as I am typing in dialog.
How do I avoid.

Prathibarani
Top achievements
Rank 1
 asked on 14 Aug 2024
0 answers
205 views

Hi,

currently I'm evaluating/experimenting with the kendo grid. I have a question regarding grid editing. I read, that we can use the directive 'kendoGridInCellEditing' to simplify our code base and avoid bolierplate codes. But in this case if we click on a cell, the cell goes automatically in edit mode.  Alternatively we can use the 'manual' mode and write all the boilerplate code. I found a feature request on this topic: https://feedback.telerik.com/kendo-angular-ui/1661188-provide-an-option-for-activating-in-cell-editing-on-double-click

I investigated the internal methods of the grid and did the following:


this.grid.cellClick.subscribe((cellClickEvent) => {
      this.grid.closeCell();
    });


With this piece of code, the grid won't go in edit mode. This is fine, but regardless of this, if we inspect f. e. the grid row element in the browser debug mode, then we see, that after clicking on a cell, the row element is updated. The question is, how we can prevent it, while having the 'kendoGridInCellEditing' still active?

In the meantime I discovered, that the updating of the row element occurs also in any other cases if the cell goes in edit mode. In the kendo source code there should be some logic, which updates the 'tr' element of the grid. I guess this is because an editor is showing in the grid. How can we avoid this update? The background of my question is, that I do some DOM manipulation inside the grid, and every time, if the grid goes in edit mode, this manipulations are gone, because the 'tr' element gets refreshed.

peter
Top achievements
Rank 1
 updated question on 14 Aug 2024
0 answers
54 views

Hi,

I am trying to build angular 17 standalone component based on kendo ui menu for angular. Goal is to replace menu in old angularjs app built using kendo ui for jquery. I am trying to migrate little parts one by one.

I built component and added it to the old app, menu is rendered using default theme, but for some reason menu is dead - open or select events don't trigger. So i don't see submenus or cant select even anything on the root.

On the other side, if i put kendo ui button for angular in the same component, it works normally and triggers event on click.

Do you please have any ideas how to proceed next, because menu is one of crucial components I need for the further migration.

Thank you.

Regards,
Vedad

Vedad
Top achievements
Rank 3
Bronze
Bronze
Iron
 asked on 13 Aug 2024
0 answers
93 views

In Angular Grid Grouping, Do we have the ability to display a row with multiple columns instead of a specific field?
For Ex: 
https://www.telerik.com/kendo-angular-ui/components/grid/grouping/basics/
Instead of adding a specific field that we group by, Could we add a row with multiple columns?

Additionally, is there a way to achieve a hierarchical view within the grid itself? Similar to the Master Detail functionality, we'd like to have sub-rows that share the same columns as the main row, but without treating them as separate components with distinct headers.
https://www.telerik.com/kendo-angular-ui/components/grid/master-detail/#:~:text=To%20apply%20a%20hierarchical%20order%20to%20the%20desired,are%20filtered%20by%20the%20parent%20key%20field%20value.


Aya
Top achievements
Rank 1
 asked on 13 Aug 2024
1 answer
73 views
The Angular Grid Filter Menu doc page (https://www.telerik.com/kendo-angular-ui/components/grid/filtering/filter-menu/) has a stackblitz example (https://stackblitz.com/run/?file=src%2Fapp%2Fapp.component.ts). The products.ts file in that example has dates but no times, e.g. new Date(1996, 8, 20). Filter by "is equal to" on 8/20/1996 returns one row, as expected. But when I modify that file and add a time, say 10:11:05, and filter by "is equal to" and enter date 8/20/1996, no results are returned. How can I supply exact times but filter only on date? I can create a filter using "is after or equal to" combined with "is before or equal to", but that is non-intuitive to my users. I could use the DateTimePicker, but the users don't want to select a time, they just want to select the date. There is a similar discussion in the forum (https://www.telerik.com/forums/filter-date-column-with-year) but that just has to do with the year. I could create a similar function, but that seems like overkill. Is there an easier way? 
Zornitsa
Telerik team
 answered on 13 Aug 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?