Navin Leon
Navin Leon

Reputation: 1166

Add record to grid ext js 3.4

First of all am new to Ext js.

I have a ext js grid on page which uses version 3.4 of EXT JS.

I uses the store.loadData to bind the grid. Now I need to insert a row without refreshing the grid(I mean append the grid); however, I find the below method on documentation insert( Number index, Ext.Component component )

My question is how can I convert my object array(which contacts the new record data) to component.

Thanks in advance..

Regards, Navin

Upvotes: 2

Views: 4594

Answers (1)

Jarred Nicholls
Jarred Nicholls

Reputation: 66

I think the docs show a pretty good example of adding a Ext.data.Record to a store. When you supply a store to a grid, it binds to the store (listens to the appropriate events) and will refresh the grid view automatically.

Check out the recordType[1] property in the docs, which is a constructor function you can use to create more records for your store. Then just use the CRUD API to add the record to the store.

[1] http://docs.sencha.com/ext-js/3-4/#!/api/Ext.data.Store-property-recordType

Upvotes: 2

Related Questions