Telerik Forums
Kendo UI for Angular Forum
0 answers
68 views

Hi,

Is there a way to hide unrelated parent items when expand ?

 

Jijo
Top achievements
Rank 1
 asked on 15 Dec 2020
1 answer
2.7K+ views

I have a kendo grid which is filterable.  I need sorting enabled as well.  Achieved it by using "[sortable]="true"" (I do not need multi-column sort). 

Now I am trying to implement sorting with nulls last i.e. for both the sort orders (asc & desc), I need the nulls to appear last.  

All the materials I found so far explains custom sort using "(sortChange)="sortChange($event)". For this we need the data to be bound using [data].  But using [data] is not an option for me as I need the filtering option enabled as well. (As per this link, for the filters to work, [kendoGridBinding] needs to be used - [data]  cannot be used)

Please assist me to implement custom sorting. 

<kendo-grid [filterable]="true" 
                        [sortable]="true" 
                        [pageable]="true" 
                        [kendoGridBinding]="dataSource"
                        (dataStateChange)="onDataStateChange($event)" 
                        (cellClick)="onCellClick($event)">

Svet
Telerik team
 answered on 15 Dec 2020
1 answer
211 views

We can set the 'selected' and 'expanded' property of a panelbaritem,

 

but when we set the focused  property, the UI doesn't update. Only when we tap with the mouse does the focused state change.

 

How can we do this in code?

            item.selected = true;
            item.focused = true;

Svet
Telerik team
 answered on 15 Dec 2020
1 answer
136 views

I have a PanelBar with children. How can I make the children index an extra 3em so that the children are moved to the right and appear under the parent, offset by a bit.

 

Right now the children are directly below their parent.

 

        <kendo-panelbar-item title="Orders">
          <kendo-panelbar-item title="Upload Orders"></kendo-panelbar-item>
          <kendo-panelbar-item title="Batch Summary"></kendo-panelbar-item>
        </kendo-panelbar-item>

Martin Bechev
Telerik team
 answered on 15 Dec 2020
6 answers
694 views

Hi,

I don't need the items "Quotation", "Heading 5" and "Heading 6" in the "Format" dropdown list in the Editor's toolbar. How could I achieve that?

Martin Bechev
Telerik team
 answered on 15 Dec 2020
0 answers
311 views
Hi Team, 

Few days ago I had implemented In-Cell editing on my grid. Using this topic - https://www.telerik.com/kendo-angular-ui/components/grid/editing/in-cell-editing/. Everything work perfectly

And today I got the requirement to implement bulk editing, but keep the In-Cell editing on the grid as well. I had investigated a lot about how to do this, but not coming with anything yet. Under "Bulk" editing I mean the posibilitty to select multiple cells in Column (Press and hold Ctrl, and click the desired cells) then change value in one - press enter - changes applied to all selected cells within column. It's not should be everything like I said, but the main idea "change value in one - press enter - changes applied to all selected cells" 

Please give me some advice on how it can be possible to achieve

Looking forward to your reply

Thank you,
Nazar
Nazar
Top achievements
Rank 1
 asked on 14 Dec 2020
2 answers
473 views

I have created a custom multi select filter. The bottom items cannot be selected. To reproduce in the stackblitz below:

  1. open product id filter
  2. click into multi select
  3. scroll down and select bottom item

The item is not selected. However if you select the top item first, and then scroll to the bottom and select it, it works.

At first I thought it was because the popup menu was closing, but I added the code to prevent it closing when the multi select popup has been clicked, which prevents the close but no event occurs for the item selection.

Here's a stackblitz demonstrating the issue:

https://stackblitz.com/edit/angular-mnxcmn

Any idea if I can resolve this on my end?

 

Thanks.

esp
Top achievements
Rank 1
Veteran
 answered on 13 Dec 2020
1 answer
350 views

Hello, there is an example how to close the popup on document click (https://www.telerik.com/kendo-angular-ui/components/popup/closing/#toc-on-document-click-or-escape), but the source doest'n loading.I need a best practice solution without triggering the change detection for the whole application.

Regards

Martin Bechev
Telerik team
 answered on 11 Dec 2020
3 answers
1.8K+ views

Hi

Im noticing some behaviors I was not expecting when using the treeview with checkboxes and expandable nodes. 
Some of it could be my understanding of expectations. 
My sample code is here, it's a hierarchy of users with expandable nodes and checkboxes and it shows what keys have been checked, what keys have been expanded and includes buttons for collapsing and expanding and a search.

https://stackblitz.com/edit/angular-cnzlah?file=app/app.component.ts

1. Open the sample, The treeview loads collapsed,
   if i check "User 1", i see it in my list of checked keys (1),
   if i open the "User 1" node using the chevron, i then see more checked keys(1,2,4).  Is this expected behavior ? 
   I would expect after checking "user 1" to see all the keys checked (1,2,3,4) since checkChildren = true. 
   If I expand all then check "User 1" then i do see all the nodes checked (1.2.3.4)

2. Refresh the sample,
   Check "user 1",
    expand the "User 1" node,
    expand the "User 2" node.
    Uncheck user 1",
    collapse the "User 1" node,
    Check user 1",
    expand the "User 1" node, 
    *** now the child nodes are not being checked

3. Refresh the sample, 
     Check "user 1", 
     Click "Expand All" button ... 
     *** now the child nodes are not being checked ....
 

Svet
Telerik team
 answered on 11 Dec 2020
3 answers
7.2K+ views
Hello. Is it possible to hide scroll on grid if data list is short and show when it's big? For example when we filter data list.
I found only this solution:
 
<input type="text"  #filterInput  placeholder="Search" (keyup)="itemsFilter(filterInput.value)" />
 
<kendo-grid class="grid-customized-border"
  [style.height.px]="300"
  scrollable="scrollable"
  [data]="gridView"
  [sortable]="{
    allowUnsort: allowUnsort,
    mode: 'single'
    }"
  [sort]="sort"
  (sortChange)="sortChange($event)"
  [selectable]="true"
  [kendoGridSelectBy]="'id'"
  [selectedKeys]="selectedRows"
  #grid
>
 
itemsFilter(value) {
    if (value) {
      this.gridView.data = this.gridView.data(item => {
        return item.title.toLowerCase().indexOf(value.toLowerCase()) === 0
      });
    }
    setTimeout(() => this.toggleScroll());
}
 
public toggleScroll() {
    if (this.grid) {
      let el = this.grid.nativeElement,
        content = el.querySelectorAll('.k-grid-content')[0],
        table = el.querySelectorAll('.k-grid-table-wrap')[0],
        header = el.querySelectorAll('.k-grid-header')[0];
      if (table && content) {
        if (table.offsetHeight < content.offsetHeight) {
          content.style.cssText = 'overflow-y: auto';
          header.style.cssText = 'padding: 0';
        } else {
          header.style.cssText = 'padding: 0 16px 0 0';
        }
      }
    }
}
Anastasiya
Top achievements
Rank 1
 answered on 09 Dec 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
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
Bronze
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?