我可以在AG网格中使用循环进行过滤吗

时间:2019-10-26 15:38:17

标签: ag-grid

我需要有关过滤器实例的帮助,我想从总和为90的数组中的对中进行过滤。我尝试了下面的代码,但没有用。

export class FilterComponent implements OnInit {
private i; 
private r; 
private indx;

 constructor() { }

 ngOnInit() {

 }

filterInPairs(){
for(this.i =1; this.i<=89; this.i++)//I'm trying to print 1.......89
for(this.r =89; this.r>0; this.r--)//print 89....1 in descending order

//console.log(this.i) works perfect
//console.log(this.r) works

for(this.indx =0; this.indx <89; this.indx ++) //increase by 1 till 

this.gridApi.setQuickFilter(i[this.indx],r[this.indx]);
//I am expecting an output like {1,89},{2,88},{3,87}......but I did't get anything
}
}

0 个答案:

没有答案