Class: GridColumn

F. GridColumn

new F.GridColumn(options)

F.GridColumn.js, line 69
表格列控件
Name Type Description
options Object 初始参数
Name Type Default Description
text string '' 标题栏显示的文字
headerTooltip string '' 标题栏文字的提示文本
headerTooltipType string 'qtip' 标题栏文字的提示文本类型(可选项为:qtip, title)
headerTooltipPosition string '' 标题栏文字的提示信息位置(仅在headerTooltipType=qtip时有效)(可选项为:'', top, topstart, topend, bottom, bottomstart, bottomend, left, leftstart, leftend, right, rightstart, rightend)
showTooltip boolean false 是否显示单元格文字的提示文本
tooltipType string 'qtip' 单元格文字的提示文本类型(可选项为:qtip, title)
tooltipPosition string '' 单元格文字的提示信息位置(仅在tooltipType=qtip时有效)(可选项为:'', top, topstart, topend, bottom, bottomstart, bottomend, left, leftstart, leftend, right, rightstart, rightend)
hidden boolean false 是否隐藏
sortable boolean false 是否允许排序
sortField string '' 排序字段
sorter F_GridColumn_sorter 自定义表格列排序函数
resizable boolean true 是否可以改变列宽度
lockable boolean false 是否允许锁定
locked boolean false 是否处于锁定状态
columnId string '' 列标识符
order number 列顺序
align string '' 文本的排列位置(可选项为:left, right, center)
headerAlign string '' 标题文本的排列位置(可选项为:left, right, center)
width number 列宽度
flex number 列宽度(hbox布局)
minWidth number '' 列的最小宽度
maxWidth number '' 列的最大宽度
menu boolean true 是否启用表头菜单
hideable boolean true 启用表头菜单中的隐藏列功能
filter Object 表头过滤参数
Name Type Default Description
multi boolean false 是否启用多条件
showMatcher boolean false 是否显示多条件匹配下拉框
matcherDefault string 'all' 多条件匹配规则的默认值(可选项为:all, any)
operator F.DropDownList 操作符
field F.Field 过滤字段
fieldRequired boolean false 过滤字段是否必填项
field string '' 本列对应的数据字段
fieldType string 'string' 字段类型(可选项为:string, int, float, double, boolean, date)
fieldFormat string '' 字段格式化字符串(仅用于fieldType==date)
htmlEncode boolean false 是否在客户端进行HTML编码(默认为false)
editable boolean false 是否启用本列的单元格编辑功能
editor F.Field 单元格编辑器
autoSelectEditor boolean false 单元格编辑时自动选中编辑框内的文本(默认为false)
editGetter F_GridColumn_editGetter 自定义编辑器获取函数
editSetter F_GridColumn_editSetter 自定义编辑器设置函数
columnType string 'renderfield' 列类型(可选项为:renderfield, checkboxfield, rowexpanderfield, rownumberfield)
pagingNumber boolean false 是否启用分页行号(仅用于columnType==rownumberfield)
treeNumber boolean false 是否启用树表格行号(仅用于columnType==rownumberfield)
checkboxEditable boolean false 复选框是否可编辑(仅用于columnType==checkboxfield)
checkboxDisplayType boolean '' 复选框的显示类型(仅用于columnType==checkboxfield,可选项为:default, switch, radio)
expanded boolean false 展开所有的行扩展列(仅用于columnType==rowexpanderfield)
expandOnDblClick boolean true 双击展开折叠行扩展列(仅用于columnType==rowexpanderfield)
expandOnEnter boolean true 回车按键展开折叠行扩展列(仅用于columnType==rowexpanderfield)
expandToSelectRow boolean false 点击行扩展列的图标时选中行(仅用于columnType==rowexpanderfield)
renderer F_GridColumn_renderer 自定义单元格渲染函数
summaryText string '' 合计行文本
summaryType string 'sum' 合计行类型(可选项为:sum, min, max, count, avg)
summaryRenderer F_GridColumn_summaryRenderer 自定义合计行渲染器函数
rowGroupSummaryText string '' 行分组的合计行文本
rowGroupSummaryType string 'sum' 行分组的合计行类型(可选项为:sum, min, max, count, avg)
rowGroupSummaryRenderer F_GridColumn_rowGroupSummaryRenderer 自定义行分组的合计行渲染器函数
type string 'gridcolumn' 控件类型

Extends

Methods

hide()

F.GridColumn.js, line 139
隐藏列

inherited isType(value){boolean}

F.Base.js, line 23
检测当前实例是否指定的控件类型
Name Type Description
value Object 控件类型
Returns:
Type Description
boolean 如果当前实例是指定的控件类型,返回true;否则返回false
Example
grid1.isType('panel') // 返回true
grid1.isType('grid')  // 返回true

isVisible(){boolean}

F.GridColumn.js, line 150
列是否可见
Returns:
Type Description
boolean 是否可见

setEditable(editable)

F.GridColumn.js, line 168
设置列的可编辑状态
Name Type Description
editable boolean 是否可编辑

setHideable(hideable)

F.GridColumn.js, line 179
设置表头菜单的隐藏列功能
Name Type Description
hideable boolean 是否启用

setVisible(visible)

F.GridColumn.js, line 162
设置列的显示状态
Name Type Description
visible boolean 是否可见

show()

F.GridColumn.js, line 144
显示列

toggleEditable()

F.GridColumn.js, line 173
切换列的可编辑状态

toggleHideable()

F.GridColumn.js, line 184
切换表头菜单的隐藏列功能

toggleVisible()

F.GridColumn.js, line 156
切换列的显示状态