Home > Web Front-end > JS Tutorial > Ext modifies GridPanel data, font color, css attributes, etc._extjs

Ext modifies GridPanel data, font color, css attributes, etc._extjs

WBOY
Release: 2016-05-16 16:44:49
Original
1586 people have browsed it

Ext modifies GridPanel data and font color, etc., not just EditGridPanel

First get the selected row (of course you can also get the cell):

Copy code The code is as follows:

var selectedRow = grid.getSelectionModel().getSelected();

Modify the settings:
Copy code The code is as follows:

selectedRow.set("key","value");

Modify the background color, first get the row number, and then get the view object of the row:
Copy code The code is as follows :

var selectedIdx = grid.store.indexOf(selectedRow);
var selectedView = grid.getView().getRow(selectedIdx);

Modify row css attributes:
Copy code The code is as follows:

selectedView.style.color="# FF0000"; //The font turns red
Related labels:
ext
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template