本文介绍了如何使用一个下拉框在NG-网/ UI格列标题过滤器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的UI网(角的快速网格系统)。
如果我设置'enableFiltering:真正的',我得到的每个列标题,我可以使用过滤格,真棒下的文本框。
现在,我需要一些甚至是所有这些是下拉框代替文本框,我会怎样做到这一点?

I am using ui-grid (angular's fast grid system).If I set 'enableFiltering: true', I get an text box under each column header that I can use to filter the grid, awesome.Now I need some or even all of these to be dropdown boxes instead of text boxes, how would I achieve this?

例如。一列只能有值'OK','NOK和ABB。。所以,我想允许用户基于只有3种选择过滤列。

e.g. The one column can only have the values 'OK', 'NOK' and 'ABB.'. So I would like to allow the user to filter that column based on only those 3 options.

推荐答案

您也许应该编写自定义的在 columnDefs

You probably should write custom headerCellTemplate in columnDefs.

这篇关于如何使用一个下拉框在NG-网/ UI格列标题过滤器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-01 21:00