In Ext, Renderer is generally used to render the column model in grid. Its detailed information is recorded in the setrenderer (number Col, function FN) method in Ext. Grid. columnmodel.
1. Col: Number
The column Index
Ii. FN: Function
The function to use to process the cell's raw data to return HTML markup for the grid view. The render function is called with the following parameters:
1. Value: Object
The data value for the cell. (Cell value)
2. Metadata: Object
An object in which you may set the following attributes an object that can set the following two attributes)
** CSS: String
A css class name to add to the cell's TD element.
(Set the CSS class name for the TD element of the cell)
** ATTR: String
An HTML attribute definition string to apply to the data container element within the table cell (e.g. 'style = "color: red ;"').
(Add an HTML attribute to the cell element)
3. Record: Ext. Data. Record
The Ext. Data. Record from which the data was extracted.
(Ext. Data. Record object (entire record) corresponding to the row where the field is located ))
4. rowindex: Number
Row index (row number)
5. colindex: Number
Column index (column number)
6. Store: Ext. Data. Store
The Ext. Data. Store object from which the record was extracted.
(The data source object is the store/DS of the Grid)
There are six parameters in total.