Renderer function parameters in the gridpanel Column

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.