Hi,
New to these controls so please excuse any idiocy.
I have some data coming in from an ajax call and it is has the total record count embedded in the data as a column. This is all fine and the grid renders it no issues. However I need to be able to tell the grid the number of records that are present so that the pager can be adjusted. I have tried all sorts - adding count as a variable to an object along with the array of values. Nothing works. As an example taken from your own examples I have the following using which I want to pretend that there are 50 records total - 3 are downloaded...
<div id='Grid'></div>
<script>
var shipDetails = [
{Name: 'Hanari Carnes', City: 'Brazil', test:true },
{Name: 'Split Rail Beer & Ale', City: 'USA', test:true },
{Name: 'Ricardo Adocicados', City: 'Brazil' }
];
var test = {
result: shipDetails,
count: 50
};
var dataManager = ej.DataManager(test);
$(function () {
$('#Grid').ejGrid({
dataSource: dataManager,
allowPaging : true,
pageSettings: {
pageSize:2, showDefaults: false }
});
});
</script>