i have kendo grid with 4 columns in it
[mac,level,timestamp,message]
.
i need to store all the values under timestamp
column in an array.I tried but couldn't find any way to traverse in a particular column. Any idea how to do this using java script?
Since you're using kendo which you must include jQuery. To make life easier why don't try to use jQuery, as per my suggestion at the moment i don't know any other way but to
get & loop through the grid datasource
get the date and push it into an array
For example i create button <button id="test">Click here</button>
and kendo console <div class="console"><div>
so you can see the result after clicking the button. Here goes the code :
$("#test").click(function(){
var arrayDate = [];
var data =$("#grid").data("kendoGrid").dataSource._data;
for(i=0; i<data.length; i++){
arrayDate.push(data[i].OrderDate);
}
kendoConsole.log(arrayDate);
});
Here is working example for you on kendo dojo
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With