Telerik Forums
Kendo UI for Angular Forum
1 answer
6 views

 

I think I found an issue with some internals not refreshing properly in certain cases. Have a look at the attached GIF. The "Specify in which order the files are to be associated to target(s)" part at the bottom is tied to 

 checkedKeys.length > 0

When the condition is met, the part appears. It seems that when I click "Image Files", only this item is added to checkedKeys, not it's children, even though when I expand "Image Files", the children are indeed checked then the bottom part appears (The part on the bottom filters out parent items, such as "Image Files")




Is there any config that I'm missing ?

Here's the tree view related code

<kendo-treeview #assetTree *ngIf="treeDataLoaded" [nodes]="treeData"
                    textField="text"
                    (checkedChange)="checkedChange($event)"
                    [hasChildren]="hasChildren"
                    [children]="fetchChildren"
                    [(checkedKeys)]="checkedKeys"
                    checkBy="text"
                    kendoTreeViewCheckable
                    kendoTreeViewExpandable>

<p *ngIf="filterKeys().length > 0">Specify in which order the files are to be associated to target(s)</p>

  <div class="row" style="padding-left: 15px;">
    <div class="col-md6">
      <ul class="list-group" id="sortable">
        <li [attr.data-item]="asset" class="list-group-item" *ngFor="let asset of filterKeys()">{{asset.fileName}}</li>
      </ul>
    </div>
  </div>



public hasChildren = (item: TreeViewRootItem) => item.items && item.items.length > 0;
  public fetchChildren = (item: TreeViewRootItem) => of(item.items);
  public checkedKeys: any[] = new Array();
  public sortedKeys: any[];
  public get checkableSettings(): CheckableSettings {
    return {
      checkChildren: true,
      checkParents: true,
      mode: "multiple",
      checkOnClick: false
    };
  }

And this is the code that filters out parent items. When I check a collapsed node (Image Files) checkedKeys is only populated with "Image Files", and not it's children. When I expand "Image Files", then the console.log below outputs "Image Files" AND its children.

filterKeys(): Asset[] {

    console.log(this.checkedKeys);

    let results: Asset[] = new Array();

    this.checkedKeys.forEach(ck => {
      let exist = this.assets.find(a => a.fileName == ck);
      if (exist)
        results.push(exist);
    });

    return results;
  }
Thanks.
Slavena
Telerik team
 answered on 24 Jun 2022
2 answers
10 views
Hi, I'm attempting to post a grid's state (filters/paging/sorting/etc) from the Kendo Angular grid to a .NET Core Web Api endpoint.  The reason I've been asked to try to do this as we are building custom filters that could possibly be long enough to cause URL truncation if we pass in querystring.

Is there a way to post the grid state like below?  If so, does anyone have sample Angular code showing how to send over a request body that the back-end can transform to DataSourceRequest object and correctly apply grid state (filters/paging/sorting/etc)? My brief attempts at this have failed so far.
public DataSourceResult TestEndpoint([DataSourceRequest] DataSourceRequest request)
{
    IEnumerable<Object> myData = null;
    return myData.ToDataSourceResult(request);
}
Svet
Telerik team
 answered on 23 Jun 2022
0 answers
3 views

Hi,

I am having issue with filtering in dropdownbox.  the dropdownbox ultilizes virtualization and has 7000 rows of data.

please see below pictures for details

Step 1: work perfectly - filter by "te"

Step 2: work perfectly - filter by "tee"

step 3: fail - filter by "te" - remove "e"

my code

<kendo-combobox name="combobox" [data]="filterData"
            [allowCustom]="true" [filterable]="true" (filterChange)="handleFilter($event)"
            [valuePrimitive]="true" [textField]="dropDownTextField" [valueField]="dropDownValueField"
            [readonly]="myReadOnly" [required]="myRequired" 
            [virtual]="virtualDropDownList">
 </kendo-combobox>

 

Thank you

Danny
Top achievements
Rank 1
 asked on 22 Jun 2022
0 answers
8 views

I have a dropdown within a for loop that looks like this:

<kendo-dropdownlist
	[name]="'Type_Name_' + index"
	[data]="this.types"
	[textField]="'name'"
	[valueField]="'id'"
	[ngModel]="{
		id: UserInfo.TypeId,
		name: this.types[UserInfo.TypeId].name
	}"
	(selectionChange)="onTypeChange($event, UserInfo)"
>
	<ng-template kendoComboBoxItemTemplate let-dataItem>
		<span [title]="dataItem.name">{{ dataItem.name }}</span>
	</ng-template>
</kendo-dropdownlist>

types: any = [];

The types are pulled from the DB and look like this:
[
  {
    "id": -1,
    "name": "Select"
  },
  {
    "id": 1,
    "name": "A type"
  },
  {
    "id": 2,
    "name": "Another Type"
  }
]

 

The dropdown loads ok. But when I choose the value "Select" which is -1 the whole dropdown disappears.
Similarly because this is in a for loop I allow more dropdowns to be dynamically added.

When I dynamically add them with a value of -1 they don't appear. When I add them with a value of 0 they do appear.

I'm constricted to use -1 as the start value.

Rory
Top achievements
Rank 1
 asked on 22 Jun 2022
1 answer
10 views

Hi,

I used a pie chart and when click different series would call seriesClick event. How to get color of the series I click? The pie color is default and I did not set color for the chart. Thank you.

Hetali
Telerik team
 answered on 21 Jun 2022
0 answers
4 views

Hi,

I am using kendo angular grid . angular version(12).We have a grouping feature in the grid  , using groupfootertemplate it loads some description for the group.

Issue

Lets assume we have 20 records overall. This is grouped based on a field and in result we get 2 groups with 15 and 5 items respectively. I should populate the group footer template after the last item of each group. Here the pagesize is set as 10 items per page.  But what we are observing is ,

in the first page ,after 10th element a group footer is populated and one in the second page after 5th element(first group's last record ie 15th) and the final one after last element of second group. So overall 3 footertemplate is being populated

Requirement

I should see the groupfootertemplate only after last record of group .ie in the first page I dont want the groupfootertemplate. Only after the 15th record and 20th record I should populate the groupfooter template. So in total there should be 2 group footer template insted of 3

Naveen
Top achievements
Rank 1
 updated question on 21 Jun 2022
1 answer
6 views

Hi

My page contains a kendo drawer. and I set a custom icon to the drwer item. I uploaded the icons on my server and pass the icon name and location at run time. The con is not shown. this is my code

 populateDrware(data: RspModules[]) {
    for (let i = 0; i < data.length; i++) {
      const item: {
        text: string;
        icon: string;
        selected: boolean;
        rspModule: RspModules;
        url: string;
      } = {
        text: '',
        icon: '',
        selected: false,
        rspModule: {},
        url: '',
      };
      item.text = data[i]?.modules?.enDesc as string;
      item.url = data[i]?.modules?.url as unknown as string;
      item.icon = "https://www.dhaman.net/wp-content/uploads/apps-icon/"+data[i]?.modules?.icon as unknown as string;
      item.selected = false;
      item.rspModule = data[i];
      this.items.push(item);

    }

 

 <kendo-drawer
    #drawer
    [items]="items"
    [mini]="true"
    [expanded]="true"
    mode="push"
    (select)="onSelect($event)"
    class="raised-panel"
    [autoCollapse]="isCollapsed"
  >
  </kendo-drawer>
Yanmario
Telerik team
 answered on 20 Jun 2022
1 answer
13 views
Don't we have Ratings widget in Kendo UI for angular?
Hetali
Telerik team
 answered on 17 Jun 2022
2 answers
16 views

Hi,

I just upgraded my project to Angular 14, with node 14. Project does not compile anymore. If I remove reference to kendo-angular-editor, it is working fine.

Error is coming from Prosemirror libraries, that are dependencies of kendo-angular-editor.

Olivier
Top achievements
Rank 1
Iron
 updated answer on 17 Jun 2022
1 answer
7 views

I am using Kendo-datetimepicker in my Angular app. In my Reactive form i set the intial value as null for FormControlName. When i close the component without updating any value. It shows the following error. Please someone guide me through this. Thanks in Advance.

 

ERROR TypeError: Cannot read properties of null (reading 'isEmpty')
    at DateTimePickerComponent.isEmpty (index.js:8605:53)
    at FloatingLabelComponent.updateState (index.js:463:44)
    at Object.updateState [as next] (index.js:535:40)
    at SafeSubscriber.__tryOrUnsub (Subscriber.js:183:1)
    at SafeSubscriber.next (Subscriber.js:122:1)
    at Subscriber._next (Subscriber.js:72:1)
    at Subscriber.next (Subscriber.js:49:1)
    at EventEmitter_.next (Subject.js:39:1)
    at EventEmitter_.emit (core.mjs:22416:15)
    at FormControl.updateValueAndValidity (forms.mjs:2514:31)
Martin
Telerik team
 answered on 17 Jun 2022
Top users last month
sun
Top achievements
Rank 2
Iron
Iron
Iron
Alan
Top achievements
Rank 2
Iron
Iron
Paul
Top achievements
Rank 2
Iron
Veteran
Iron
Ohad
Top achievements
Rank 2
Iron
Iron
Iron
arkan
Top achievements
Rank 2
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?