title: Unable to access data array in Kendo grid datasource
body: <p>The Backstory: </p>
  
  <p>I'm tring to do some custom validation for a kendo grid I'm making using their Mvc wrapper. I want to check the user's input against the current data to make sure the user isn't duplicating an entry. To do this, I'll need to access the Grid's data array.</p>
  
  <p>My Code:</p>
  
  <pre><code>@using Kendo.Mvc.UI
  @model ViewModel.SecurityManagementViewModel
  
  
  &lt;div class="container containerOuterBorder"&gt;
      &lt;div class="containerBorder"&gt;
          &lt;div class="pageTitle"&gt;Users&lt;/div&gt;
      &lt;/div&gt;
  
      @(Html.Kendo().Grid&lt;User&gt;()
          .Name("Users")
          .Columns(columns =&gt;
          {
              columns.Bound(c =&gt; c.LastName).Title("Last Name");
              columns.Bound(c =&gt; c.FirstName).Title("First Name");
              columns.Bound(c =&gt; c.WindowsId).Title("Windows Id");
              columns.Bound(c =&gt; c.Email).Title("Email");
              columns.Bound(c =&gt; c.RoleId).Title("Access Role")
                  .EditorTemplateName("SecurityManagementEditor").ClientTemplate("#:RoleName#");
              columns.Command(command =&gt;
              {
                  command.Edit();
                  command.Destroy();
              });
          })
          .ToolBar(toolbar =&gt;
          {
              toolbar.Create().Text("Add New User");
              toolbar.Custom().Text("Manage Roles").Url("/Admin/SecurityRoles");
          })
          .Editable(editable =&gt; editable.Mode(GridEditMode.InLine))
          .Sortable()
          .DataSource(dataSource =&gt; dataSource
              .Ajax()
              .ServerOperation(false)
              .Model(model =&gt; model.Id(u =&gt; u.UserId))
              .Create(update =&gt; update.Action("SecurityManagement_Create", "Admin"))
              .Read(read =&gt; read.Action("SecurityManagement_Read", "Admin"))
              .Update(update =&gt; update.Action("SecurityManagement_Update", "Admin"))
              .Destroy(update =&gt; update.Action("SecurityManagement_Destroy", "Admin"))
          )
      )
  
  &lt;/div&gt;
  
  &lt;script&gt;
      $(document).ready(function () {
          //logging the grid
          console.log($("#Users").data().kendoGrid);
  
          //logging the data, by various means
          console.log($("#Users").data().kendoGrid.dataSource.view());
          console.log($("#Users").data().kendoGrid.dataSource._data);
          console.log($("#Users").data("kendoGrid")._data);
  
          //logging the columns (successful)
          console.log($("#WFMUsers").data("kendoGrid").columns);
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>The Problem:</p>
  
  <p>When I try to access the data array from the grid's dataSource, the response is always null in some way. This is made more frustrating by the fact that, logging the grid itself, I can <em>see</em> the data that has already loaded. I can also access, with little effort, other properties, such as columns.</p>
  
  <p>Logs:</p>
  
  <p><a href="https://i.stack.imgur.com/AvWQy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AvWQy.png" alt="The Grid Object. Clearly, the _data array is populated"></a></p>
  
  <p>The Grid Object. Clearly, the _data array is populated</p>
  
  <p><a href="https://i.stack.imgur.com/uuPLS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uuPLS.png" alt="The Objects Contained in the grid. I Can See Them!"></a></p>
  
  <p>The Objects Contained in the grid. I Can See Them!</p>
  
  <p><a href="https://i.stack.imgur.com/SuqIb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SuqIb.png" alt="The result of the last 4 lines. The first 3, trying to access _data, all come up empty. The last, accessing columns, is returned without issue."></a></p>
  
  <p>The result of the last 4 lines. The first 3, trying to access _data, all come up empty. The last, accessing columns, is returned without issue.</p>
  
  <p>I have tried:</p>
  
  <ul>
  <li>Multiple ways of phrasing the code.</li>
  <li>Restarting Visual Studio</li>
  <li>Running on FireFox, Chrome, and IE</li>
  <li>Rebooting my computer</li>
  </ul>