View Full Version : Grid Paging: Proxy to Read a Function question.

5 Nov 2009, 8:45 PM

This is my first post on here, and I have been browsing the forums for over 4 months now. Kudos to the community on help I've found on these here forums, you've helped me out a lot already and am really grateful and thankful. I just only started using ExtJS since 3.0.0 was officially released. Thanks!!!

I've tried my best not to post anything, sorry. So here's my question/situation.

I am creating an paging grid that gets its data from a separate function that returns an array ([[1,2,3,4],[1,2,3,4]]). This function uses ActiveXObjects and is IE6 only(X_X). I made it this was so that it can access and query an MS Access database that's on the network and return an array of data (This I cannot change this until my work changes their minds).

I already had success in creating the list using ux.data.PagingMemoryProxy however I read that for large amount of "entries" I should be using something else.

*Please note this is using the paging toolbar.

Problems I had with PagingMemoryProxy:
- Large Number of Entries = slowness around 5000
- When I refesh, it refreshes the original "store"(when it first ran the function) and does not execute the function "AccessDatabase" again.

I'm trying to use DirectProxy to run the function , and it does run the function(it says hi to me), however it does not populate the grid.... does DirectProxy only accept JSONReader and not Array reader?
If I am supposed to use JSON format can someone show me how to set it up for DirectProxy....I looked at some examples, but I couldn't figure it out(for example what is 'tid' ? thread id?)...sorry

Even if I use Direct proxy will it "refresh" if I click on the refresh button in the paging toolbar?

I was thinking about trying live grid, but I can't seem to go to the site or find the latest version.

Here's what I have so far to access the directproxy. Am I missing "param" stuff?

var ObjColModel = new Ext.grid.ColumnModel({
defaults: {
sortable: true // columns are not sortable by default
columns:[{.......}] // this section is too cumbersome to write here
var store = new Ext.data.Store({
params:{start:0, limit:25},
proxy: new Ext.data.DirectProxy({
directFn: FnQueryQCTracker()
reader: new Ext.data.ArrayReader({
fields: [
{name: 'submissionNumber'},
{name: 'submitDate'},
{name: 'submitProc'},
{name: 'submitName'},
{name: 'locationOne'},
{name: 'locationTwo'},
{name: 'qcStatus'},
{name: 'qcMember',type:'string'},
{name: 'completeDate'},
{name: 'qcComments'},
{name: 'emailHTML'}

var ObjGrid = new Ext.grid.GridPanel({
autoExpandColumn: "submitName",
autoScroll: true,
clicksToEdit: 1,
columnLines: false,
cm: ObjColModel,
enableColumnMove: false,
enableHdMenu: false,
header: false,
height: 700,
hideBorders: false,
id: 'qc-t-grid',
//layout: 'fit',
plugins: [editor],
region: 'west',
sm:new Ext.grid.RowSelectionModel({
listeners: {
selectionchange: function(sel){
var rec = sel.getSelected();
split: 'true',
stateful: true,
stateId: 'grid',
store: store,
stripeRows: true,
title: 'Title',
viewConfig: {
width: 600,
bbar: new Ext.PagingToolbar({
pageSize: 25,
store: store,
displayInfo: true,
displayMsg: 'Displaying topics {0} - {1} of {2}',
emptyMsg: "No topics to display",
style: "border: none",
});There are a couple things that think i could do, but what do you guys think I should do?

There is no web server software anywhere for php or asp....I could create an external json file or array file and read that in, but read the file in with what though and how?

Sorry to drag on a bit, but I don't want to come across like I haven't tried and that I am thinking and not just trying to come to the community before I try some stuff first.

Thank you very much for reading and any thoughts you have (aka help).