PDA

View Full Version : Grid Panel:Adding row after last entry



JSchwehn
16 Mar 2012, 4:42 AM
Hi everyone,

lets assume the example in the tutorial
http://docs.sencha.com/ext-js/4-0/#!/example/grid/row-editing.html (http://docs.sencha.com/ext-js/4-0/#%21/example/grid/row-editing.html)

By pressing the 'Add Employee' - Button a new row will be added as the first line.

But how do I put the new line after the last row?
Or how do I count the displayed rows?

Any RTFM Pointers are welcome.

chramer
16 Mar 2012, 5:08 AM
last = store.getCount();
store.insert(last, r);
rowEditing.startEdit(last, last-1);

JSchwehn
16 Mar 2012, 5:37 AM
Thanks,

works great. Sometimes it is easier than thought.

-Jens.