Add a row in Dojo datagrid
Struggling to find a bit of code to easily understand. How do you add a row and clear all rows in a Dojo datagrid (version 1.4.2). Lets say the data is 2 columns with customerID and address. I am using dojo.data.ItemFileWriteStore to store values in - but again not quite sure how this should be used. It can't be that hard. Cheers. You can get the data store reference from the grid using grid.store , then you can use store.newItem() to create a new item in the store. This new item is added as a new row in the grid. For example, store.newItem({customerID : 1, address : "Somewhere"}) . To clear