Adding an empty row to a grid

前端 未结 2 2009
遇见更好的自我
遇见更好的自我 2021-01-16 03:52

I am trying to add rows to my grid.

I saw an example in the docs:

onAddRouteClick: function(){
// Create a model instance
var rec = new KitchenSink.m         


        
2条回答
  •  天涯浪人
    2021-01-16 04:18

    So you are trying to add a record to store right? OK, lets look at the Store API http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.data.Store-method-add

    Sample usage:

       myStore.add({some: 'data'}, {some: 'other data'});
    

    The best practice is to also create a Model class . Read the component guides on grid and the data package .

提交回复
热议问题