The renderer of ExtJS

Source: Internet
Author: User

Renderer:function (value, Cellmeta, record, RowIndex, ColumnIndex, store) {
Todo
}
1.value is the value of the current cell
2.cellmeta saved is Cellid cell id,id do not know what to do, it seems to be a column number, CSS is the CSS style of this cell.
3.record is all the data in this line, what you want, record.data["id") so you get it.
4.rowIndex is the line number, not the meaning of the number from the beginning, but the calculation of the results after paging.
5.columnIndex column number.
6.store actually this is the DS that you pass when you construct the table, which means that all the data in the table

Simple example:

Renderer:function (value) {
if (value = = ' Male ') {
Return "<span style= ' color:red;font-weight:bold; ' > Male </span> ";
} else {
Return "<span style= ' color:green;font-weight:bold; ' > Women </span> ";
}

END

The renderer of ExtJS

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.