PIM-1230 : Datagrid refactoring

Bug fix: [no]
Feature addition: [no]
Backwards compatibility break: [no]
Unit test passes: [yes]
Behat scenarios passes: [yes]
Checkstyle issues: [no]*
Fixes the following jira:
 - PIM-1230
 - PIM-1238
 - PIM-1240