class type t =Inheritsobject..end
method addRowCls : 'a. 'a Js.t -> Js.js_string Js.t -> unit Js.methAdds a CSS Class to a specific row.
Parameters:
_ Js.t
An HTMLElement, index or instance of a model representing this row
Js.js_string Js.t
method autoSizeColumn : 'b. 'b Js.t -> unit Js.methSizes the passed header to fit the max content width. Note that group columns shrinkwrap around the size of leaf columns. Auto sizing a group column autosizes descendant leaf columns.
Parameters:
_ Js.t
The header (or index of header) to auto size.
method beforeDestroy : unit Js.methInvoked before the Component is destroyed.
method collectData : 'c.
Ext_data_Model.t Js.js_array Js.t ->
Js.number Js.t -> 'c Js.t Js.js_array Js.t Js.methFunction which can be overridden which returns the data object passed to this DataView's template to render the whole DataView.
This is usually an Array of data objects, each element of which is processed by an
XTemplate which uses '<tpl for=".">' to iterate over its supplied
data object as an Array. However, named properties may be placed into the data object to
provide non-repeating data such as headings, totals etc.
Parameters:
Ext_data_Model.t Js.js_array Js.t
An Array of Ext.data.Models to be rendered into the DataView.
Js.number Js.t
the index number of the Record being prepared for rendering.
Returns:
_ Js.t Js.js_array Js.t
An Array of data objects to be processed by a repeating XTemplate. May also contain named properties.
method focus_table : 'd 'e 'f 'g.
bool Js.t Js.optdef ->
'd Js.t Js.optdef ->
'e Js.callback Js.optdef ->
'f Js.callback Js.optdef -> (#Ext_Component.t as 'g) Js.t Js.methTry to focus this component.
Parameters:
bool Js.t (optional)
If applicable, true to also select the text in this component
_ Js.t (optional)
Delay the focus this number of milliseconds (true for 10 milliseconds).
_ Js.callback (optional)
Only needed if the delay parameter is used. A function to call upon focus.
_ Js.callback (optional)
Only needed if the delay parameter is used. The scope (this reference) in which to execute the callback.
Returns:
#Ext_Component.t Js.t
The focused Component. Usually this Component. Some Containers may
delegate focus to a descendant Component (Windows can do this through their
defaultFocus config option.
method focusRow : 'h 'i. 'h Js.t -> 'i Js.t Js.optdef -> unit Js.methFocuses a particular row and brings it into view. Will fire the rowfocus event.
Parameters:
_ Js.t
An HTMLElement template node, index of a template node, the id of a template node or the
_ Js.t (optional)
Delay the focus this number of milliseconds (true for 10 milliseconds). record associated with the node.
method getBodySelector : unit Js.methReturns a CSS selector which selects the outermost element(s) in this view.
method getCellSelector : Ext_grid_column_Column.t Js.t Js.optdef -> unit Js.methReturns a CSS selector which selects a particular column if the desired header is passed, or a general cell selector is no parameter is passed.
Parameters:
Ext_grid_column_Column.t Js.t (optional)
The column for which to return the selector. If omitted, the general cell selector which matches ant cell will be returned.
method getColumnSizerSelector : 'j. 'j Js.t -> unit Js.methReturns a CSS selector which selects the element(s) which define the width of a column.
This is used by the Ext.view.TableLayout when resizing columns.
Parameters:
_ Js.t
method getDataRowSelector : unit Js.methReturns a CSS selector which selects a row which contains cells.
These may not correspond to actual records in the store. This selector may be used to identify things like total rows or header rows as injected by features which modify the rowTpl.
method getFeature : Js.js_string Js.t -> Ext_grid_feature_Feature.t Js.t Js.methGet a reference to a feature
Parameters:
Js.js_string Js.t
The id of the feature
Returns:
Ext_grid_feature_Feature.t Js.t
The feature. Undefined if not found
method getItemSelector : unit Js.methReturns a CSS selector which selects items of the view rendered by the rowTpl
method getNode_table : 'k. 'k Js.t -> bool Js.t Js.optdef -> Dom_html.element Js.t Js.methReturns the node given the passed Record, or index or node.
Parameters:
_ Js.t
The node or record
bool Js.t (optional)
true to return the data row (not the top level row if wrapped), false
to return the top level row.
Returns:
Dom_html.element Js.t
The node or null if it wasn't found
method getNodeContainerSelector : unit Js.methReturns a CSS selector which selects the element which contains record nodes.
method getPosition : bool Js.t Js.optdef -> Js.number Js.t Js.js_array Js.t Js.methGets the current XY position of the component's underlying element.
Parameters:
bool Js.t (optional)
If true the element's left and top are returned instead of page XY.
Defaults to: falseReturns:
Js.number Js.t Js.js_array Js.t
The XY position of the element (e.g., [100, 200])
method getRecord : 'l. 'l Js.t -> Ext_data_Model.t Js.t Js.methGets a record from a node
Parameters:
_ Js.t
The node to evaluate
Returns:
Ext_data_Model.t Js.t
record The Ext.data.Model object
method getRowClass : 'm.
Ext_data_Model.t Js.t ->
Js.number Js.t ->
'm Js.t -> Ext_data_Store.t Js.t -> Js.js_string Js.t Js.methOverride this function to apply custom CSS classes to rows during rendering. This function should return the CSS class name (or empty string '' for none) that will be added to the row's wrapping div. To apply multiple class names, simply return them space-delimited within the string (e.g. 'my-class another-class'). Example usage:
viewConfig: {
getRowClass: function(record, rowIndex, rowParams, store){
return record.get("valid") ? "row-valid" : "row-error";
}
}
Parameters:
Ext_data_Model.t Js.t
The record corresponding to the current row.
Js.number Js.t
The row index.
_ Js.t
DEPRECATED. For row body use the getAdditionalData method of the rowbody feature.
Ext_data_Store.t Js.t
The store this grid is bound to
Returns:
Js.js_string Js.t
a CSS class name to add to the row.
method indexOf : 'n. 'n Js.t -> Js.number Js.t Js.methFinds the index of the passed node.
Parameters:
_ Js.t
An HTMLElement template node, index of a template node, the id of a template node or a record associated with a node.
Returns:
Js.number Js.t The index of the node or -1
method initComponent : unit Js.methThe initComponent template method is an important initialization step for a Component. It is intended to be implemented by each subclass of Ext.Component to provide any needed constructor logic. The initComponent method of the class being created is called first, with each initComponent method up the hierarchy to Ext.Component being called thereafter. This makes it easy to implement and, if needed, override the constructor logic of the Component at any step in the hierarchy.
The initComponent method must contain a call to callParent in order to ensure that the parent class' initComponent method is also called.
All config options passed to the constructor are applied to this before initComponent is called,
so you can simply access them with this.someOption.
The following example demonstrates using a dynamic string for the text of a button at the time of instantiation of the class.
Ext.define('DynamicButtonText', {
extend: 'Ext.button.Button',
initComponent: function() {
this.text = new Date();
this.renderTo = Ext.getBody();
this.callParent();
}
});
Ext.onReady(function() {
Ext.create('DynamicButtonText');
});
method onDestroy : unit Js.methAllows addition of behavior to the destroy operation. After calling the superclass's onDestroy, the Component will be destroyed.
method refresh : unit Js.methRefreshes the grid view. Sets the sort state and focuses the previously focused row.
method removeRowCls : 'o. 'o Js.t -> Js.js_string Js.t -> unit Js.methRemoves a CSS Class from a specific row.
Parameters:
_ Js.t
An HTMLElement, index or instance of a model representing this row
Js.js_string Js.t
method walkRecs : Ext_data_Model.t Js.t -> Js.number Js.t -> unit Js.methNavigates from the passed record by the passed increment which may be +ve or -ve
Skips hidden records.
If no record is visible in the specified direction, returns the starting record index unchanged.
Parameters:
Ext_data_Model.t Js.t
The Record to start from.
Js.number Js.t
The distance to move from the record. May be +ve or -ve.
method walkRows : Js.number Js.t -> Js.number Js.t -> unit Js.methIncrements the passed row index by the passed increment which may be +ve or -ve
Skips hidden rows.
If no row is visible in the specified direction, returns the input row index unchanged.
Parameters:
Js.number Js.t
The zero-based row index to start from.
Js.number Js.t
The distance to move the row by. May be +ve or -ve.