Fixed issue when adding new items when editing a grid