Ext.data.JsonP.Backgrid_Column({ "tagname": "class", "name": "Backgrid.Column", "extends": "Backbone.Model", "mixins": [ ], "alternateClassNames": [ ], "aliases": { }, "singleton": false, "requires": [ ], "uses": [ ], "enum": null, "override": null, "inheritable": null, "inheritdoc": null, "meta": { }, "private": null, "id": "class-Backgrid.Column", "members": { "cfg": [ { "name": "defaults", "tagname": "cfg", "owner": "Backgrid.Column", "meta": { }, "id": "cfg-defaults" } ], "property": [ ], "method": [ { "name": "editable", "tagname": "method", "owner": "Backgrid.Column", "meta": { "protected": true }, "id": "method-editable" }, { "name": "initialize", "tagname": "method", "owner": "Backgrid.Column", "meta": { }, "id": "method-initialize" }, { "name": "renderable", "tagname": "method", "owner": "Backgrid.Column", "meta": { "protected": true }, "id": "method-renderable" }, { "name": "sortValue", "tagname": "method", "owner": "Backgrid.Column", "meta": { }, "id": "method-sortValue" }, { "name": "sortable", "tagname": "method", "owner": "Backgrid.Column", "meta": { "protected": true }, "id": "method-sortable" } ], "event": [ ], "css_var": [ ], "css_mixin": [ ] }, "linenr": 9, "files": [ { "filename": "column.js", "href": null } ], "html_meta": { }, "statics": { "cfg": [ ], "property": [ ], "method": [ ], "event": [ ], "css_var": [ ], "css_mixin": [ ] }, "component": false, "superclasses": [ "Backbone.Model" ], "subclasses": [ ], "mixedInto": [ ], "parentMixins": [ ], "html": "

Hierarchy

Backbone.Model
Backgrid.Column

A Column is a placeholder for column metadata.

\n\n

You usually don't need to create an instance of this class yourself as a\ncollection of column instances will be created for you from a list of column\nattributes in the Backgrid.js view class constructors.

\n
Defined By

Config options

Backgrid.Column
: Object
Column defaults. ...

Column defaults. To override any of these default\nvalues, you can either change the prototype directly to override\nColumn.defaults globally or extend Column and supply the custom class to\nBackgrid.Grid:

\n\n
// Override Column defaults globally\nColumn.prototype.defaults.sortable = false;\n\n// Override Column defaults locally\nvar MyColumn = Column.extend({\n  defaults: _.defaults({\n    editable: false\n  }, Column.prototype.defaults)\n});\n\nvar grid = new Backgrid.Grid(columns: new Columns([{...}, {...}], {\n  model: MyColumn\n}));\n
\n
  • name : string (optional)

    The default name of the model attribute.

    \n
  • label : string (optional)

    The default label to show in the header.

    \n
  • cell : string|Backgrid.Cell (optional)

    The default cell type. If this\nis a string, the capitalized form will be used to look up a cell class in\nBackbone, i.e.: string => StringCell. If a Cell subclass is supplied, it is\ninitialized with a hash of parameters. If a Cell instance is supplied, it\nis used directly.

    \n
  • headerCell : string|Backgrid.HeaderCell (optional)

    The default header\ncell type.

    \n
  • sortable : boolean|string|function(): boolean (optional)

    Whether\nthis column is sortable. If the value is a string, a method will the same\nname will be looked up from the column instance to determine whether the\ncolumn should be sortable. The method's signature must be function\n(Backgrid.Column, Backbone.Model): boolean.

    \n

    Defaults to: true

  • editable : boolean|string|function(): boolean (optional)

    Whether\nthis column is editable. If the value is a string, a method will the same\nname will be looked up from the column instance to determine whether the\ncolumn should be editable. The method's signature must be function\n(Backgrid.Column, Backbone.Model): boolean.

    \n

    Defaults to: true

  • renderable : boolean|string|function(): boolean (optional)

    Whether this column is renderable. If the value is a string, a method will\nthe same name will be looked up from the column instance to determine\nwhether the column should be renderable. The method's signature must be\nfunction (Backrid.Column, Backbone.Model): boolean.

    \n

    Defaults to: true

  • formatter : Backgrid.CellFormatter | Object | string (optional)

    The\nformatter to use to convert between raw model values and user input.

    \n
  • sortType : \"toggle\"|\"cycle\" (optional)

    Whether sorting will\ntoggle between ascending and descending order, or cycle between insertion\norder, ascending and descending order.

    \n

    Defaults to: "cycle"

  • sortValue : (function(Backbone.Model, string): *) | string (optional)

    The function to use to extract a value from the model for comparison during\nsorting. If this value is a string, a method with the same name will be\nlooked up from the column instance.

    \n
  • direction : \"ascending\"|\"descending\"|null (optional)

    The initial\nsorting direction for this column. The default is ordered by\nBackbone.Model.cid, which usually means the collection is ordered by\ninsertion order.

    \n

    Defaults to: null

Defined By

Methods

Backgrid.Column
( ) : function(Backgrid.Column, Backbone.Model): boolean | booleanprotected
...
\n

Returns

Backgrid.Column
( attrs )
Initializes this Column instance. ...

Initializes this Column instance.

\n

Parameters

  • attrs : Object
    \n
    • name : string

      The model attribute this column is responsible\nfor.

      \n
    • cell : string|Backgrid.Cell

      The cell type to use to render\nthis column.

      \n
    • label : string (optional)
    • headerCell : string|Backgrid.HeaderCell (optional)
    • sortable : boolean|string|function(): boolean (optional)

      Defaults to: true

    • editable : boolean|string|function(): boolean (optional)

      Defaults to: true

    • renderable : boolean|string|function(): boolean (optional)

      Defaults to: true

    • formatter : Backgrid.CellFormatter | Object | string (optional)
    • sortType : \"toggle\"|\"cycle\" (optional)

      Defaults to: "cycle"

    • sortValue : (function(Backbone.Model, string): *) | string (optional)

Throws

Backgrid.Column
( ) : function(Backgrid.Column, Backbone.Model): boolean | booleanprotected
...
\n

Returns

Backgrid.Column
( ) : function(Backbone.Model, string): *
Returns an appropriate value extraction function from a model for sorting. ...

Returns an appropriate value extraction function from a model for sorting.

\n\n

If the column model contains an attribute sortValue, if it is a string, a\nmethod from the column instance identifified by the sortValue string is\nreturned. If it is a function, it it returned as is. If sortValue isn't\nfound from the column model's attributes, a default value extraction\nfunction is returned which will compare according to the natural order of\nthe value's type.

\n

Returns

  • function(Backbone.Model, string): *
    \n
Backgrid.Column
( ) : function(Backgrid.Column, Backbone.Model): boolean | booleanprotected
...
\n

Returns

" });