1

I am creating a sample i want to show blank rows after fill data on grid. Here is my code for add empty rows on grid

  var records = [];
        for (var row = 15; row > 0; row--) {
            records.push({});
        }
        this.lookupReference('mygrid').getStore().add(records);

after fill data my output grid is-:

output screenshot

Now i am sorting by group id just click on Id header. Now blank row shows on top.

Output screenshot

error outout

Please suggest me to set blank rows on bottom on all case

Manoj Pandey
  • 87
  • 1
  • 1
  • 11
  • Btw why do you put the empty rows there? – pagep Nov 30 '16 at 23:53
  • user can type on empty grid for add record – Manoj Pandey Dec 01 '16 at 07:55
  • I see, the best way for you would be to overwrite the sort function on the column class you use. You would have to take a better look into the source code of the framework as these functions are not exposed normally. – pagep Dec 01 '16 at 11:58
  • thanks pagep for reply me. How i will do it can you tell me example. I am new in extjs since 1 month. If possible can give me hint on short with code. – Manoj Pandey Dec 01 '16 at 13:25
  • Which exact version of ExtJS are you using - it looks old? From 6.0.1 there is sorter config of column exposed where you can write your own sort function http://docs.sencha.com/extjs/6.2.0/classic/Ext.grid.column.Column.html if you are on 4.1.3 there is sorter config on the Store http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.util.Sortable-cfg-sorters unfortunately I don't have much experience / time to look into this, maybe you find the answer somewhere, try to google "extjs custom sorter" something like that... – pagep Dec 01 '16 at 15:33

0 Answers0