Telerik Forums
Kendo UI for Angular Forum
2 answers
1.0K+ views

Hi,

I have a Kendo UI grid which is binding to a GridDataResult. It fetches data from a .NET API and is using toDataSourceRequestString on a DataSourceRequestState to formulate the query parameters. The API is in turn returning a DataSourceResult.

The grid needs to support paging, sorting, filter and grouping. On returning grouped results, the front end is using translateDataSourceResultGroups to unpack the data.

The API currently returns something like this:

{
  "data":[
    {
      "foo":1,
      "bar":80,
      "baz":[
        {
          "date":"2017-04-01T00:00:00",
          "value":25
        },
        {
          "date":"2017-05-01T00:00:00",
          "value":27
        },
        {
          "date":"2017-06-01T00:00:00",
          "value":28
        }
    }, etc...
  ],
  "total":8,
  "aggregateResults":null,
  "errors":null
}

 

If I didn't need to use server side grouping etc then I could just flatten the "baz" property array before binding but with grouping the results get pretty complicated. Is it possible rather to bind the data as is and bind properties from the nested array as a column? For instance, in the example above, I am attempting to have columns:

"foo", "bar", "2017-04-01", "2017-05-01", "2017-06-01"

and the first record row values:

1, 80, 25, 27, 28

The "baz" array is a series of dynamic column + value pairs.

 

Any ideas appreciated. Thanks.

esp
Top achievements
Rank 1
Veteran
 answered on 12 Feb 2018
1 answer
387 views

I follow the example on this link https://www.telerik.com/kendo-angular-ui/components/layout/panelbar/ to try out the panelbar control

but the result not matching the sample. What is missing?

 

Thanks,

Bryian Tan

Dimiter Topalov
Telerik team
 answered on 09 Feb 2018
1 answer
201 views

Hi, is there a  method to the jQuery "setOptions" for the Kendo Angular grid? I need to allow the user to "reset" the grid to original configuration after columns have been reordered. 

 

Thanks,

Svet
Telerik team
 answered on 09 Feb 2018
2 answers
138 views

Hi, 

I've discovered that there is a feature "columnMenu", available for JQuery Grid.

Is it possible to have it in Kendo for Angular Grid?

Thanks,

Yuriy

Yuriy
Top achievements
Rank 1
 answered on 07 Feb 2018
1 answer
143 views

I have couple of questions

1. Where do find the full package to install all the Kendo-UI component for Angular 5? Do I have to login using the account with the Subscription information? I follow this link https://www.telerik.com/kendo-angular-ui/getting-started/#toc-project-setup

to setup the button using this command line

npm install --save @progress/kendo-angular-buttons @progress/kendo-angular-l10n @angular/animations

I assumed there is a full package somewhere, instead of running the above command 10 times for 10 different components.

2. In order to use the latest Kendo-UI for Angular 5, do I need to upgrade/renew my Subscription?

 

Thanks,

Bryian Tan

 

 

bryian
Top achievements
Rank 1
 answered on 07 Feb 2018
2 answers
685 views

Hi,

is there a way to leave only the first input for a filter an remove all the others?
Or any other way to get rid of extra "AND" options.

Thanks,

Yuriy

Yuriy
Top achievements
Rank 1
 answered on 07 Feb 2018
2 answers
1.5K+ views

Hello, I'd like to use the [icon] property of the <button> component:

 <button kendo-button [icon]="'save'">Save</button>

but I got this error at runtime:

zone.js:654 Unhandled Promise rejection: Template parse errors:
Can't bind to 'icon' since it isn't a known property of 'button'. ("               <tr>
                        <td>
                            <button kendo-button [ERROR ->][icon]="'save'">Save</button>
                        </td>
                    </tr>
"): ng:///Apps_Root/Apps/PricingConfig/app.html@29:49 ; Zone: <root> ; Task: Promise.then ; Value: Error: Template parse errors:
Can't bind to 'icon' since it isn't a known property of 'button'. ("               <tr>
                        <td>
                            <button kendo-button [ERROR ->][icon]="'save'">Save</button>
                        </td>
                    </tr>

If I remove [icon] and use class="k-i-save", I dont get the runtime error but I dont get the floppy-disk icon next to the label Save.

<button kendo-button class="k-i-save">Save</button>

Could someone tell me how to resolve this [icon] property error?

Thanks!

 

Chau
Top achievements
Rank 1
 answered on 05 Feb 2018
1 answer
1.5K+ views
Is it possible to use DialogService to open a confirmation box and specify the content with html tags without using template reference or component?
Dimiter Topalov
Telerik team
 answered on 02 Feb 2018
2 answers
640 views

Hi,

We are encountering an issue with the Kendo TreeView where it is bound to an array containing all checkedKeys. The TreeView is contained inside a shared angular component, which has an input which retrieves the IDs of the selected items and adds them to the array the TreeView is bound to.

Although the data is loaded in without issues, the Tree View does not refresh itself to show the check-boxes unless it is clicked upon or a node is expanded forcing it to redraw itself.

How can we ensure the TreeView automatically updates to show the check-boxes for all selected items, or perform a refresh on demand?

ngOnChanges() {
        var checkedItems = this.dataSource.filter(orgGroup => this.selectedOrgGroupIDs.indexOf(orgGroup.id) >= 0);
        //checkedItems.forEach(item => this.selectedOrgGroups.push(item));
        this.selectedOrgGroups = this.selectedOrgGroups.slice().concat(checkedItems);
}

The above method implements the lifecycle hook to ensure any updates to the input property are properly parsed/received. Originally, we were pushing each item to the sleectedOrgGroups collection (which is what the Kendo TreeView's checkedKeys is bound to), however based off the following "https://www.telerik.com/forums/refresh-treeview-with-angular-5-and-typescript", we modified it to perform a slize and concat with the new collection of items but it fails to render itself automatically.

Note: Clicking on the TreeView control, selecting or un-selecting a node, or expanding/collapsing a node automatically causes it to refresh.

Your input on this matter would be greatly appreciated. Thanks!

Best Regards,
Santo

Santo
Top achievements
Rank 1
 answered on 30 Jan 2018
3 answers
4.0K+ views

Hi,

I am trying to replicate the sample at https://www.telerik.com/kendo-angular-ui/components/grid/data-operations/data-binding/.I am getting the following error highlighted on my VS2017 and during run time:

Argument of type 'null' is not assignable to parameter of type 'GridDataResult'.

the error is occurring because of this code:

export abstract class NorthwindService extends BehaviorSubject<GridDataResult> {
 
    constructor(
        private http: HttpClient,
        protected tableName: string
    ) {
        super(null);//this line is causing 'Argument of type 'null' is not assignable to parameter of type 'GridDataResult'
    }

 

Thanks

Madani

 

Dimiter Topalov
Telerik team
 answered on 29 Jan 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?