admin管理员组文章数量:1416304
I applied multi filter to kendo grid , my application developed in angular 5, here problem that, when deleting last character from input box that time event is not firing. how can fix this issue.
example if i type some thing in input box 'alen' , dataStateChange function will each time, same thing in removing 'alen' last three later removing that time function will but first character remove or delete it will not call(dataStateChangefunction).please help me any one.
html
<kendo-grid
[data]="gridData"
[sortable]="{ mode: 'multiple' }"
[sort]="sort"
[filterable]="true"
(dataStateChange)="dataStateChange($event)"
[height]="500"
>
<kendo-grid-column field="ProductID" title="Product ID" width="120">
</kendo-grid-column>
<kendo-grid-column field="ProductName" title="Product Name">
</kendo-grid-column>
<kendo-grid-column field="UnitPrice" title="Unit Price" width="230">
</kendo-grid-column>
</kendo-grid>
</kendo-grid>
`
})
export class AppComponent {
private filter: string;
private sort: SortDescriptor[] = [];
private gridView: GridDataResult;
private products: any[] = [
{
"ProductID": 1,
"ProductName": "Chai",
"UnitPrice": 18.0000,
"Discontinued": false
},
{
"ProductID": 3,
"ProductName": "Chai",
"UnitPrice": 122.0000,
"Discontinued": true
}
,{
"ProductID": 2,
"ProductName": "Chang",
"UnitPrice": 19.0000,
"Discontinued": false
}];
constructor() {
this.loadProducts();
}
protected sortChange(sort: SortDescriptor[]): void {
this.sort = sort;
this.loadProducts();
}
public state:State={
logic: "and",
filters: [
{ field: "ProductID", operator: "contains", value:''},
{ field: "ProductName", operator: "contains", value:''},
{ field: "UnitPrice", operator: "contains", value:''}
]
}
public dataStateChange(State:DataStateChangeEvent):void{
this.state=State;
data: process(products, this.state),
}
private loadProducts(prods): void {
const products = prods || this.products;
this.gridData = {
data: process(products, this.state),
total: products.length
};
}
I applied multi filter to kendo grid , my application developed in angular 5, here problem that, when deleting last character from input box that time event is not firing. how can fix this issue.
example if i type some thing in input box 'alen' , dataStateChange function will each time, same thing in removing 'alen' last three later removing that time function will but first character remove or delete it will not call(dataStateChangefunction).please help me any one.
html
<kendo-grid
[data]="gridData"
[sortable]="{ mode: 'multiple' }"
[sort]="sort"
[filterable]="true"
(dataStateChange)="dataStateChange($event)"
[height]="500"
>
<kendo-grid-column field="ProductID" title="Product ID" width="120">
</kendo-grid-column>
<kendo-grid-column field="ProductName" title="Product Name">
</kendo-grid-column>
<kendo-grid-column field="UnitPrice" title="Unit Price" width="230">
</kendo-grid-column>
</kendo-grid>
</kendo-grid>
`
})
export class AppComponent {
private filter: string;
private sort: SortDescriptor[] = [];
private gridView: GridDataResult;
private products: any[] = [
{
"ProductID": 1,
"ProductName": "Chai",
"UnitPrice": 18.0000,
"Discontinued": false
},
{
"ProductID": 3,
"ProductName": "Chai",
"UnitPrice": 122.0000,
"Discontinued": true
}
,{
"ProductID": 2,
"ProductName": "Chang",
"UnitPrice": 19.0000,
"Discontinued": false
}];
constructor() {
this.loadProducts();
}
protected sortChange(sort: SortDescriptor[]): void {
this.sort = sort;
this.loadProducts();
}
public state:State={
logic: "and",
filters: [
{ field: "ProductID", operator: "contains", value:''},
{ field: "ProductName", operator: "contains", value:''},
{ field: "UnitPrice", operator: "contains", value:''}
]
}
public dataStateChange(State:DataStateChangeEvent):void{
this.state=State;
data: process(products, this.state),
}
private loadProducts(prods): void {
const products = prods || this.products;
this.gridData = {
data: process(products, this.state),
total: products.length
};
}
Share
Improve this question
asked May 25, 2018 at 3:32
rani boyinirani boyini
811 silver badge5 bronze badges
3
- Please help me any one – rani boyini Commented May 25, 2018 at 5:25
- Hello can you please help me – rani boyini Commented May 25, 2018 at 6:15
- did that answer help you? – Ed Norris Commented Jul 20, 2019 at 3:45
2 Answers
Reset to default 9Add [filter]="state.filter"
to the kendo-grid selector.
I was facing the same issue and it got resolved when I did the above.
I added [filter]="state.filter" it is working for me.
本文标签:
版权声明:本文标题:javascript - when last character deleting from input box, event is not firing in kendo grid and angular 5? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745252864a2649928.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论