title: Loop through Kendo Grid Column values - JavaScript
body: <p>What is correct way to loop through Kendo Grid Column Values in JavaScript and perform an if statement on the values:</p>
  
  <pre><code>    var dataSource = $("#grid").data("kendoGrid").dataSource;
      // Gets the full set of data from the data source
      var allData = dataSource.data();
      dataSource.fetch();
      var datasourcedata = dataSource.data();
  
      var dataitem = datasourcedata[i].(columnName);
      for (var i = 0; i &lt; dataitem.value; i++) {
          if (dataitem.value == 0) {
              alert("error message");
            e.preventDefault();
              return false;
          }
      }
  
     });
  </code></pre>