I want to create a grid like this: http://www.sencha.com/deploy/dev/examples/grid/edit-grid.html
Actually, I already did this, but I want to highlight the last inserted row of my grid (in extjs, this is the highlight () function, which executes the yellow element in the element).
I actually failed to do this ... my problem is that I cannot get the line I just inserted, and therefore I cannot select it. Any clues?
Thanks in advance
You only need to do this (here for line number one):
var row = grid.getView().getRow(0); Ext.get(row).highlight();
It is easy.
Code has
store.insert(0, p);
, ?
, Ext.grid.RowSelectionModel , selectLastRow, :)
Ext.data.store , ,
add : ( Store this, Ext.data.Record[] records, Number index )
/. this.getSelectionModel().select(0); 0, 0. ExtJS 4.2.0.
this.getSelectionModel().select(0);
var rec = Ext.create('App.model.GridModel', { id: '123', name: 'ABC' }); this.store.insert(0, rec); this.getSelectionModel().select(0);
Source: https://habr.com/ru/post/1757642/More articles:Compilation of a Flash project without Flash IDE - flashGetting MDB2 to work with sqlite3 via pdo - phpBrowse WebDAV - c #Eclipse Formatting Against Checkstyle Inconsistency - eclipseIs it possible to install git in xampp localhost? - gitpivot table row in column - sqlФункция PHP для разметки тегов, за исключением списка белых тегов и атрибутов - htmlhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1757645/how-to-add-multiple-jars-to-classpath&usg=ALkJrhhvCZxv8eF1GgwmPq4wdUkK_nqNigredis config question? - redisIs a “static” keyword required in PHP? - phpAll Articles