PDA

View Full Version : Using a hash in a grid?



maccman
24 Apr 2007, 6:16 AM
My data is stored in a hash, rather than an array, since I'm using specific indexes. I'm wondering what would be the easiest way to read this data into an Ext.data.Store?

tryanDLS
24 Apr 2007, 8:36 AM
Doesn't really matter how you store it - a hash table is no more than a 2 dimensional array that allows keyed access. You still have to pass an array of key/value pairs to the store. If you want to access the store data by key, make that you're id field; otherwise you can let it autogen the id and just store the key and value as fields of the store.