View Full Version : how to add new row in grid

23 Jan 2008, 5:07 AM
I am using grid to display data to users. But now i want the users to add data. But i don't know how to add the data in the grid. The grid, i am displaying to users, has 2 columns. I just have to add the data in second column. I don't want to use inline editing method.
Waiting for reply.


31 Jan 2008, 11:04 AM
You will need to take a look into the grid's underlying Ext.data.Store component. You can directly create a new Record object and call Ext.data.Store.add(Record) to add entire new rows. If you need to change values in an existing row, then you can use the selectionmodel to get to the selected Records, or you can even directly loop through the Records of the store using 'each'.