Select to view content in your preferred language

dgrid not showing all the records of a query

993
6
03-11-2014 11:19 AM
MichelleRogers1
Occasional Contributor
I'm populating a dgrid with the results of a query task and the dgrid is not populating all of the records for the specific day selected with the date picker.  Is there an extra bit of code that I need to insert to change the max number of records allowed?  We could have up to 17,300 records for a given day and we want to show all of those records in the dgrid as well as show them on the screen when clicking the Show On Map button.  The code is on jsfiddle here:http://jsfiddle.net/mrogers83/Hz59f/7/

Our services are not public facing, so you may have to put your own services in to see if what you are changing will work, or you can just give me suggestions, and I'll try them until I get something that works:)

Any help is appreciated.

Michelle
0 Kudos
6 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Michelle,

By default the maximum number of records returned by the server is set to 1,000.  You can increase this by right-click on the service in the Catalog window > Service Properties > Parameters.
0 Kudos
MichelleRogers1
Occasional Contributor
Hi Michelle,

By default the maximum number of records returned by the server is set to 1,000.  You can increase this by right-click on the service in the Catalog window > Service Properties > Parameters.


Jake,

We increased the number of records returned by the server to 2,000 but the maximum number of records being returned to the dgrid is 250.  Is there a way to increase this to match the number of records being returned by the server?  If I need to do paging, that would be ok too, I just need a way to display all of the records that are being returned by the server.

Thanks
0 Kudos
KenBuja
MVP Esteemed Contributor
Are you setting the idProperty of the store? See this thread.
0 Kudos
MichelleRogers1
Occasional Contributor
Are you setting the idProperty of the store? See this thread.


Ken,

I set the idProperty, still no change in the number of records the dgrid is showing.  I want to say that I saw somewhere that the max number of records a dgrid shows is 250, but not 100% sure.  I am wondering if there is a way to change that max number of records?  I realize the script will take longer to run, but it would be worth it if I can access all of the records for one day.

Michelle
0 Kudos
KenBuja
MVP Esteemed Contributor
I have a grid showing over 2000 records, built using this code

var data = arrayUtils.map(results.features, function (feature) {
   return lang.clone(feature.attributes);
});
var memStore = new Memory({ data: data, idProperty: "OBJECTID" });
var diveGrid = new (declare([Grid, Selection, DijitRegistry, ColumnHider]))({
   id: "diveGrid",
   bufferRows: Infinity,
   columns: parameters.diveQueryDgridColumns,
   selectionMode: "single",
   store: memStore
});
0 Kudos
MichelleRogers1
Occasional Contributor
I have a grid showing over 2000 records, built using this code

var data = arrayUtils.map(results.features, function (feature) {
   return lang.clone(feature.attributes);
});
var memStore = new Memory({ data: data, idProperty: "OBJECTID" });
var diveGrid = new (declare([Grid, Selection, DijitRegistry, ColumnHider]))({
   id: "diveGrid",
   bufferRows: Infinity,
   columns: parameters.diveQueryDgridColumns,
   selectionMode: "single",
   store: memStore
});


Ken,

Where is that code, inside your function?  I tried modifying my code, but it kept giving me errors.  My code is on jsfiddle here:http://jsfiddle.net/mrogers83/Hz59f/10/

You may have to replace my services with your own because they are not public facing services due to the information being private information.

Michelle
0 Kudos