Hi,
I've a TreeView and it seem that I'm too stupid to updated data or trigger a reload...
my template:
<kendo-treeview kendoTreeViewExpandable [nodes]="categories" textField="name" [children]="fetchChildren" [hasChildren]="hasChildren">
my component (relevant parts only):
{ public categories: IProductCategory[]; @ViewChild(TreeViewComponent) tree: TreeViewComponent; fetchChildren = (item: IProductCategory): Observable<IProductCategory[]> => { return Observable.create(observer => { const categoryListPromise = this._categoriesStore.query({ filter: { field: 'parentId', operator: 'eq', value: item.id } }).then(result => { observer.next(result.records); }); }); };}
so..
* the data input is bound to this.categories, which is a flat list of category objects
* the fetchChildren method loads and returns child categories
Now I'll get updates from our (custom) data layer and have to update the tree:
this._categoriesStore.updates().subscribe(e => { const event: { record: ICategory, type: 'update'|'delete'|'create' } = e; // update tree view .. // ???});
I can update the root categories by simply updating the cmp.categories array, but this array does not contain any child nodes. I was looking for something like "tree.getNode().reload()" but,.. nope,.. and I'm confused :-)
So my questions are...
* How can I update child nodes that are loaded using function defined in "children" input?
* How can I tell the tree view to reload children of a single node (execute fetchChildren() again)?
Thanks and best regards,
Chris
Hi,
I'm trying to use the Upload control with a an asp.net core web api backend.
My server code is expecting to receive a file with a content-type of 'multipart/form-data', the Upload control is sending it as 'application/json'. Is there a way I can set the content-type of the posted file?
I tried setting the content-type in the UploadEvent (https://www.telerik.com/kendo-angular-ui/components/upload/api/UploadEvent/)
uploadEventHandler(e: UploadEvent) { e.headers.set('Content-Type', 'multipart/form-data') }but it was ignored.
I am following the sample instructions from the link: https://www.telerik.com/kendo-angular-ui/components/grid/data-operations/data-binding/automatic-operations/#toc-custom-directives
In the ProductsBindingDirective, the rebind method calls the service passing the state of the grid.
In the ProductsService which extends NorthwindService (extending BehaviorSubject), the fetch method sends a request to the Base_URL with the grid state info passed as query string parameters, e.g. https://odatasampleservices.azurewebsites.net/V4/Northwind/Northwind.svc/Products?$orderby=UnitPrice&$count=true&$skip=0
Question: Does the Northwind.svc execute a SQL query for every fetch method request, and rebuild a new result set based on the query string parameters? Or does it execute the SQL query once, and applies the query string parameters criteria (skip, orderby, pagesize, etc) on the same result set initially retrieved?
In my case, I have a query returning tens of thousands of records, so I want to confirm which component is processing the grid state information. Should the ProductsService (being a BehaviorSubject) keep the initial big result set as its own property and apply the grid state criteria, or does it just pass the grid state to the server and expect to receive the correct data?
Thanks!
The Angular MultiSelect dropdown control normally opens the dropdown popup when you click inside the search text box. But its not happening in one particular scenario in which you click right next to the last selected value (still inside the search text box).
So if you have selected some values already and you want to open up the popup again to select more then you have to click approximately a couple of centimeters away from the last selected value in the text box. I can see this happening in the simple demo available in the documentation as well.
Has anybody else observed the same?

Hi,
Assume I have a datasource with ID and Name fields. I display the Name but the main field is ID. I manage to show the right Name and get the ID with a combobox in Edit and Add mode. But how can I fix the filter for Name?
<kendo-grid-column field="ID" title="Begrepp"> <ng-template kendoGridCellTemplate let-dataItem> {{dataItem.Name}} </ng-template> <ng-template kendoGridEditTemplate let-dataItem="dataItem" let-column="column" let-formGroup="formGroup" let-isNew="isNew"> <kendo-combobox [valuePrimitive]="true" [formControl]="formGroup.get(column.field)" [data]="personBegreppData" textField="Name" valueField="ID" [placeholder]="dataItem.Name" (filterChange)="handleACFilter($event)" [filterable]="true"> </kendo-combobox> </ng-template> <ng-template kendoGridFilterCellTemplate let-filter let-column="column"> <kendo-grid-string-filter-cell [showOperators]="false" [column]="column" [filter]="state.filter"> </kendo-grid-string-filter-cell> </ng-template></kendo-grid-column>
TL;DR: Any plans for virtualisation support on Treeview?
I've attached an example project.
The data is a set of companies. Each company has 5 offices. Each office has a collection of Drivers and a collection of Vehicles. There are 1000 Drivers and 1000 Vehicles in each.
1: Run the app
2: Expand a company
3: Expand an office
4: Expand one of the child nodes (Drivers or Vehicles)
On my computer, this takes about 7 seconds to open. I think it is a combination of adding so many DOM elements and also using an ng-template inside the tree.
This might improve in Angular6, but it seems that creating all of those DOM elements is a waste of resources anyway. Do you have any plans for supporting virtualisation in your Treeview component?
I'm getting this error:
ERROR in node_modules/@progress/kendo-angular-buttons/dist/es/navigation/navigation-config.d.ts(1,10): error TS2305: Module '".../node_modules/@angular/core/core"' has no exported member 'OpaqueToken'.
Using @angular/core version 5.2.9
I've been trying at this for a couple days and noticing the same thing, ie. that I can get a combobox to read back selected values and record them successfully to a grid, I can get a combobox on its own to take and save the new custom values to my back-end through REST, but I can't combine the two.
As far as the API's are concerned this combination works for in-grid selection:
<kendo-combobox [formControl]="dimensionTypeGridFormGroup.get('dimensionTypeId')"
[data]="dimensiontypes"
[textField]="'name'"
[valueField]="'id'"
[valuePrimitive]="true">
</kendo-combobox>
This for creating new content:
<kendo-combobox [allowCustom]="true"
[data]="combolists"
[textField]="'name'"
[valueField]="'id'"
[valueNormalizer]="valueNormalizer"
[(ngModel)]="clbuilder">
</kendo-combobox>
It seems like the moment I add [allowCustom] to a combobox in a grid cell it causes two things to happen:
1) the grid cell will be blank on save
2) only the default value is saved in the grid formgroup for that cell.
In a lot of cases I could indeed save my new record to my back end but the grid would stop working. In some of my trial and error I noticed that confusion was occurring (in the combobox API references) between the form control data and the combobox data (such as 'id' in the formGroup vs. in the export interface array).
Is there a right way to do this through the combobox API components and, if not, is there a way that I could push the values I need back to the grid from somewhere else like a valueChange or valueNormalizer method? I remember there being an edit.service push back to grid in the in-cell grid editing example but I'm not sure how to hit that from within a component yet.