Kendo UI for Angular如何保存网格状态 [英] Kendo UI for Angular how to save grid state
问题描述
如何保存Angular 2+ Kendo网格的状态.在AngularJS中,我们使用了getOptions和setOptions( https://www.telerik.com/论坛/persist-state-in-angularjs ),但我找不到有关如何针对最新版本的Kendo for Angular(
How to save the state of an Angular 2+ Kendo grid. In AngularJS we used getOptions and setOptions (https://www.telerik.com/forums/persist-state-in-angularjs) but I can not find any documentation on how to do this for the latest version of Kendo for Angular (https://www.telerik.com/kendo-angular-ui/components/grid/). Thank you in advance for any help or guidance.
推荐答案
也许这是一个不错的开始: https://plnkr.co/edit/?p=预览
Maybe this is a good start: https://plnkr.co/edit/?p=preview
我们使用这种方法来存储过滤器状态:
we use this approach to store filter state:
public state: State = {
skip: 0,
take: 5,
// Initial filter descriptor
filter: {
logic: 'and',
filters: [{ field: 'ProductName', operator: 'contains', value: 'Chef' }]
}
};
这篇关于Kendo UI for Angular如何保存网格状态的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!