jqGrid 5.1 colModel
Property | Type | Description | Default |
---|---|---|---|
align | string | Defines the alignment of the cell in the Body layer, not in header cell. Possible values: left, center, right. 定义该单元的取向在主体层中,而不是在标题单元格。可能的值:左,中,右。 | left |
cellattr | function | This function add attributes to the cell during the creation of the data - i.e dynamically. By example all valid attributes for the table cell can be used or a style attribute with different properties. The function should return string. Parameters passed to this function are: rowId - the id of the row val - the value which will be added in the cell rawObject - the raw object of the data row - i.e if datatype is json - array, if datatype is xml xml node. cm - all the properties of this column listed in the colModel rdata - the data row which will be inserted in the row. This parameter is array of type name:value, where name is the name in colModel 此功能在创建数据的过程中添加属性的细胞-即动态。作为例子,可用于表格单元格的所有有效属性或具有不同性质的风格属性。该函数返回的字符串。传递给该功能的参数是: ROWID -行的id VAL这将在细胞中增加的价值- rawObject -数据行的原始对象-即,如果数据类型是JSON -阵列中,如果数据类型是XML的XML节点。 厘米 -这列中的colModel列出的所有属性 RDATA 这将在该行中要插入的数据行- 。该参数的类型名称的数组:值,其中名称是在colModel名称 | null |
classes | string | This option allow to add classes to the column. If more than one class will be used a space should be set. By example classes:'class1 class2' will set a class1 and class2 to every cell on that column. In the grid css there is a predefined class ui-ellipsis which allow to attach ellipsis to a particular row. Also this will work in FireFox too. 这个选项允许类添加到列。如果不止一个类将被使用的空间应设置。举例类:“class1的类2”将在1类和类2设置为在该列的每一个细胞。在网格中的CSS有一个预定义的类UI-省略号其允许省略附加到一个特定的行。这也将在FireFox中工作了。 | empty string |
colmenu | boolean | Enables/disables column menu to appear at particular grid header. This option is valid only if the grid option colMenu is set to true. See Column menu 启用/禁用列菜单出现在特定网格报头。此选项仅对如果网格选项colMenu设置为true。见栏菜单 | true |
coloptions | object | Defines a various options for colum menu if it is enabled.For more information see Column menu. 定义各种选项的菜单科拉姆如果是enabled.For更多信息,请列菜单。 | empty |
datefmt | string | Governs format of sorttype:date (when datetype becomes local) or/and editrules [date:true] fields. Determines the expected date format for that column - i.e the format set here should correspond to the value which will be inserted into the grid. Uses a PHP-like date formatting. Currently "/", "-", and "." are supported as date separators. Valid formats are: y,Y,yyyy for four digits year YY, yy for two digits year m,mm for months d,dd for days. The values is used to sort the date correct and validate it in case of editing with validation (editrules) See Array Data 支配sorttype的格式:日期(当datetype变为本地)或/和editrules [日期:真]字段。确定该列的预期日期格式-即此处设置的格式应该对应于将被插入到网格中的值。使用PHP般的日期格式。目前, “/”, “ - ”和“” 支持的日期分隔符。有效的格式为: Y,Y,YYYY为四位数年份 YY,YY为两位数年 男,毫米几个月 D,DD为天。 值被用于排序的日期正确,并与验证(editrules)编辑的情况下进行验证参见数组数据 | Y-m-d |
editable | boolean | Defines if the field is editable. This option is used in cell-, inline- and form-editing modules. By default this option is false, which means that in inline and cell editing the field is not allowed to be edit. In form editing the field does not appear into the edit form. See Editing 如果定义字段是可编辑的。这个选项在细胞,inline-和形式编辑模块中使用。默认情况下,这个选项是错误的,这意味着内联和细胞中编辑字段是不允许被修改。在表单编辑字段不会出现到编辑形式。参见编辑 | false |
editoptions | object | Object of allowed options (properties) for the editable column. The option is valid if editable option is set to true. See Edit options 允许的选项(属性)可编辑的列对象。如果编辑选项设置为true的选项是有效的。见编辑选项 | empty |
editrules | object | Object sets additional rules for the editable field. Mostly used for validation. See Edit rules 对象设置为可编辑字段附加规则。主要用于验证。见编辑规则 | empty |
edittype | string | Defines the edit type for editing modules. Possible values: text, textarea, select, checkbox, password, button, image and file and etc. See also Edit type 定义编辑模块编辑类型。可能的值:文本,文本区域,选择,复选框,密码,按钮,图像和文件等。另请参见编辑类型 | text |
exportcol | boolean | Determines if the column should be exported when using exportToCsv, exportToExcel and exportToPdf methods. If set to false the column is not exported. See Exporting 确定列是否应该使用exportToCsv,exportToExcel和exportToPdf方法时,被导出。如果设置为false不会导出列。见导出 | true |
firstsortorder | string | Can be set to asc or desc, the column will be sorted in that direction on first sort. Subsequent sorts of the column will toggle as usual 可设置ASC或DESC,该列将在第一那种方向进行排序。随后各种各样的列将切换如常 | asc |
fixed | boolean | If set to true this option does not allow recalculation of the width of the column if shrinkToFit option is set to true. Also the width does not change if a setGridWidth method is used to change the grid width. 如果设置为true,如果shrinkToFit选项设置为true,此选项不允许列的宽度重新计算。此外,如果使用setGridWidth方法来改变网格宽度的宽度不改变。 | false |
formoptions | object | Defines various options for form editing. See Form options 定义表单编辑各种选项。见表格选项 | empty |
formatoptions | object | Format options can be defined for particular columns, overwriting the defaults from the language file. See Formatter for more details. 格式选项可以为特定列定义,覆盖的语言文件的默认值。见格式化的更多细节。 | none |
formatter | mixed | Set predefined types (string) or custom function name that controls the format of this field. See Formatter for more details. 设置预先定义的类型(字符串)或控制该字段的格式自定义函数的名称。见 格式化的更多细节。 | none |
frozen | boolean | If set to true determines that this column will be frozen after calling the setFrozenColumns method. See Frozen Columns 如果设置为true确定此列将调用setFrozenColumns方法之后被冻结。见冻结列 | false |
hidedlg | boolean | If set to true this column will not appear in the dialog where users can choose which columns to show, hide or reorder using the columnChooser method jQuery UI Integrations or colMenu Column action. 如果设置为true此列将不会出现在对话框中,用户可以选择要显示的列,隐藏或使用columnChooser方法重新排序的jQuery UI集成 或colMenu 列动作。 | false |
hidden | boolean | Defines if this column is hidden at initialization. The column is not editable and will not show in Form editing. Instead tha the column is hidden the data is presented in the grid. See methods hideCol and showCol. See editrules to edit a column in form edit when hidden. 如果此列在初始化隐藏定义。该列不可编辑,并且不会在表单编辑显示。相反,塔列是隐藏的数据呈现在网格中。见方法hideCol和showCol。见editrules时隐时现的形式编辑编辑列。 | false |
index | string | Set the index name when sorting. Passed as sidx parameter. If set this field is used in serching - i.e the field is send to the server for serching or used in local searching. 排序时设置索引名。通过为SIDX参数。如果设置此字段中serching使用 - 即场被发送到服务器进行serching或在本地搜索中 | empty |
jsonmap | mixed | Defines the json mapping for the column in the incoming json request/string. Can be used as function with parameter the row data. See Retrieving JSON Data 定义在输入JSON请求/串列中的JSON映射。可作为与参数行数据的功能。见检索JSON数据 | none |
key | boolean | Overwrite the id (defined in readers) from server or array data. Can be set as id for the unique row id. Only one column can have this property. This option have higher priority as those from the readers. If there are more than one key set the grid finds the first one and the second is ignored. When set this option is equal to the grid option keyName. 从服务器或阵列数据覆盖ID(在读取器中定义)。可以设置为ID为唯一行标识。只有一列可以有此属性。此选项拥有更高的优先权那些从读者。如果有多个键设置网格找到的第一个和第二个被忽略。当设置这个选项等于电网选项的keyName。 | false |
label | string | When colNames array is empty, defines the header caption for this column. If both the colNames array and this setting are empty, the heading for this column is values of name property. 当colNames数组为空,定义此列的标题的标题。如果colNames阵列和这个设置都是空的,此列的标题是name属性的值 | none |
name | string | Set the unique name in the grid for the column. This property is required. As well as other words used as property/event names, the reserved words (which cannot be used for names) include subgrid, cb and rn. 在网格中的列设置唯一的名称。此属性是必需的。以及用作属性/事件名称换句话说,保留字(其不能被用于人名)包括次网格,Cb和RN。 | Required |
resizable | boolean | Defines if the column can be re sized with the mouse or resizeColumn method. 定义如果列可以被重新定尺寸用鼠标或RESIZECOLUMN方法 | true |
search | boolean | When used in search modules, disables or enables searching on that column. Search Configuration 当在搜索模块中使用,禁用或该列允许搜索。搜索配置 | true |
searchoptions | object | Defines search options used in searching. Search Configuration 定义搜索中使用的搜索选项。搜索配置 | empty |
sortable | boolean | Defines if the field can be sorted. If false click with the mouse on that column does not provide any action. 如果定义字段进行排序。如果假以该列鼠标点击不提供任何行动。 | true |
sortfunc | function | Custom function to make custom sorting when datatype is local. Three parameters a, b and direction are passed. The a and b parameters are values to be compared, direction is numeric 1 and -1 for ascending and descending order. The function should return the same values as the build in JavaScript function sort - ie: 1, -1 or 0. 自定义功能进行自定义排序时数据类型是本地的。三个参数a,b和方向被传递。的一个和b参数被比较的值,方向 是数字1和-1为升序和降序。该函数返回值相同的JavaScript函数排序构建-即:1,-1或 | null |
sorttype | mixed | Used when datatype is local. Defines the type of the column for appropriate sorting and searching. Possible values: int/integer - for sorting integer float/number/currency - for sorting decimal numbers date - for sorting date (see datefmt parameter) text - for text sorting function* - defines a custom function for sorting type. To this function we pass the value to be sorted and it should return a value. See Array Data 使用时,数据类型是本地的。定义适当的排序和搜索栏的类型。可能的值: INT /整数-用于排序整数 浮点值/数/货币-用于排序十进制数 日-用于排序日期(见datefmt参数) 文本-文本排序 功能* -定义排序类型的定制功能。为了这个功能我们传递要排序的值,它应该返回一个值。 见数组数据 | text |
stype | string | Determines the input type of the element when searching - the possible values are text for creating input field and select for select element. See Search Configuration 确定搜索时该元素的输入类型-可能的值是文本创建输入字段并选择为选择元素。见搜索配置 | text |
surl | string | This option is deprecated. Use searchoptions : [dataUrl:'...'] instead. See Searching. 此选项已被弃用。使用searchoptions:[dataUrl: '...']来代替。见搜索。 | empty |
template | object | Set of valid properties for the colModel. This option can be used if you want to overwrite a lot of default values in the column model with easy. By example you can define a common object with valid colModel options and set it here to overwrite default one. See also cmTemplate in grid options 设置为colModel有效属性。如果要覆盖了很多默认值的方便列模型,此选项可以使用。举例,你可以定义有效colModel选择一个共同的目标,在这里将它设置为默认覆盖一个。又见cmTemplate 网格选项 | null |
title | boolean | If this option is false the title is not displayed in that column when we hover a cell with the mouse 如果这个选项是错误的,当我们徘徊的小区,其鼠标的标题不显示在列 | true |
width | number | Set the initial width of the column, in pixels. This value accept only number and the measure is in pixels. 设置列的初始宽度,以像素为单位。该值只接受号和措施以像素为单位。 | 150 |
widthOrg | number | This width is equal to the initial set width and does not change during resizing of the grid. 该宽度等于初始设定宽度和所述网格的尺寸调整期间不改变 | 150 |
xmlmap | string | Defines the xml mapping for the column in the incoming xml file. A CSS specification for this can be defined. Can be used as function with parameter the xmlrow data. See Retrieving Data 定义在输入XML文件的列中的XML映射。这样做的一个CSS规范可以被定义。可作为与参数xmlrow数据功能。见检索数据 | none |
unformat | function | Custom function to "unformat" a value (to bring it in its original state) of the cell when used in editing and user defined formatter is used. See Custom Formatterand Editing. (Unformat is also called during sort operations. The value returned by unformat is the value compared during the sort.) 自定义函数为“无格”的值(以使其在它的原始状态)的编辑和用户定义的格式化器使用时,电池的使用。见自定义格式化 和编辑。(UNFORMAT期间排序操作也称,通过格式化恢复返回的值是排序过程中比较的值。) | null |
viewable | boolean | This option is valid only when viewGridRow method is activated. When the option is set to false the column does not appear in view Form. 此选项才有效viewGridRow方法被激活。当选项设置为false列没有出现在视图形式 | true |