title: issue on adding to dxDatagrid
body: <p>I am using dxDataGrid devextreme(jquery).
  I have a master-detaile grid that its shows countries and city list of each country.
  when I add a country its work. but when I click to add button cities I got an error in a console that I can not add.</p>
  
  <p>where is my problem?</p>
  
  <pre><code>$(function () {
      $("#gridCountry").dxDataGrid({
          dataSource: {
              store: {
                  type: "array",
                  key: "ID",
                  data: countries
              }
          },
          columns: [{
              dataField: "CountryLatinName",
              caption: "Country Name(Latin)"
          }],
          editing: {
              mode: "form",
              allowUpdating: true,
              allowDeleting: true,
              allowAdding: true
          },
          masterDetail: {
              enabled: true,
              template: function (container, options) {
                  var country = options.data;
                  container.addClass("internal-grid-container");
                  $("&lt;div&gt;").text(country.CountryLatinName).appendTo(container);
                  $("&lt;div&gt;")
                      .addClass("internal-grid")
                      .dxDataGrid({
                          editing: {
                              mode: "form",
                              allowUpdating: true,
                              allowDeleting: true,
                              allowAdding: true
                          },
                          columnAutoWidth: true,
                          columns: [{
                              dataField: "CityLatinName",
                              caption:"City Name(Latin)"
                          }, {
                              dataField: "GMT",
                              dataType:"number"
                          }, {
                              dataField:"Capital",
                              dataType: "boolean"
                          }],
                          dataSource: country.Cities
                      }).appendTo(container);
              }
          }
      });
  }); 
  </code></pre>
  
  <p>this is my error : <code>Uncaught TypeError: Cannot read property '0' of undefined</code> and this is array of countries :</p>
  
  <pre><code>var countries = [{
      "ID": 3,
      "CountryLatinName": "Turkey",
      "PhonePrefixes":"+90",
      "Cities": [{
          "ID": 30,
          "CityLatinName": "Ankara",
          "GMT": "+3:00",
          "Capital": true
      }, {
          "ID": 31,
          "CityLatinName": "Istanbul",
          "GMT": "+3:00",
          "Capital": false
      }, {
          "ID": 32,
          "CityLatinName": "Bodrum",
          "GMT": "+3:00",
          "Capital": false
      }, {
          "ID": 33,
          "CityLatinName": "Izmir",
          "GMT": "+3:00",
          "Capital": false
      }]
  }];
  </code></pre>