PDA

View Full Version : Ext.Direct CRUD API - Read



billtricarico
28 May 2012, 8:25 PM
Hello,

In trying to build a simple GridPanel that retrieves data using an Ext.Direct store, I find myself wondering how to load the grid initially (a 'read all') versus retrieving data for a single record (a read {id}). I didn't think the directFn approach would be correct, so I figured I would try the API approach. however, only one read path can be defined. I basically need to read all when the store loads and read {id} when the user click a row on the grid.

What is the best practice for dealing with this?

Thanks.

billtricarico
28 May 2012, 8:56 PM
I guess that's what store.load() is for. This will read (load) all the records. When clicking on a record, it calls the defined API 'read' operation. Is this correct?