var rows = $(‘#jqxgrid’).jqxGrid(‘getrows’); is returning an array full of undefined variables.
Starting from the PHP/CRUD example at:
http://www.jqwidgets.com/jquery-widgets-documentation/documentation/phpintegration/php-server-side-grid-crud.htm
I wanted to see pull all the data from the grid, so I added the code from here: http://jsfiddle.net/jqwidgets/q44HB/
$(“#jqxbutton”).jqxButton({
theme: ‘energyblue’,
width: 200,
height: 30
});
$(‘#jqxbutton’).click(function () {
var rows = $(‘#jqxgrid’).jqxGrid(‘getrows’);
var result = “”;
for(var i = 0; i < rows.length; i++)
{
var row = rows[i];
result += row.firstname + ” ” + row.lastname + ” ” + row.productname + ” ” + row.date + ” ” + row.quantity + ” ” + row.price + “\n”;
}
alert(result);
});
=================================
But the alert pops up and says undefined for all values in every cell in the grid.
What am I missing?
thanks