CRUD in Vaadin Grid


I am using vaadin grid web component in polymer and it gets data from a json. Its displaying data perfectly. But there isn’t much documentation about how to dynamically add or delete a row and items in it. I currently trying to delete rows based on multiple selection. But there is no way to that. I search online but I saw the java version of the vaadin grid have add and remove row methods but not in the vaadin grid web elements. Can anyone please refer me to a page where i can find a CRUD tutorial about it.

Or just share codes for adding, deleting and updating.



The documentation has some examples how to modify the data:

In short, you first need to modify either the items array or remote data, secondly make sure the size property is set properly to represent the total size of the data available and thirdly call refreshItems() function to tell the grid to update itself whenever data changes.

I’ve made a simple example here on how to remove selected items from the data:

Hi Sauli Tähkäpää,

Thank you so much for the example! really usefull.