[CLOSED] ArrayReader: databind

  1. #1

    [CLOSED] ArrayReader: databind

    Hello,

    I declare an arrayReader within javascript like this. But I don't get the values shown

    function createDeleteGridArrayStore() {
                var data = [ ['Bill', 'Gardener'], ['Ben', 'Horticulturalist'] ];
     
                deleteStore = new Ext.net.Store({
                    autoLoad: false,
                    reader: new Ext.data.ArrayReader({
                        fields: [
                        { name: "col1" },
                        { name: "col2"}],
                        root: data
                    })
                });
                return deleteStore;
            }
    What am I doing wrong? The databind must be done in javascript not in page_load or in the codebehind.

    Romuald.
    Last edited by Daniil; Aug 05, 2010 at 12:57 PM.
  2. #2
    I found the solution.

    I use
    deleteStore.loadData(data);

    I have nonetheless a question: is it possible to bind the data with a config option?

    Romuald.
  3. #3
    Hi,

    You can set the .data config item and I think you can pass the data directly into Proxy constructor. If you inspect the render client-side source for the /Examples/GridPanel/ArrayGrid/Simple/ example, you can see how the Store/Proxy/Data is configured.

    Hope this helps.
    Geoffrey McGill
    Founder

Similar Threads

  1. [CLOSED] Using ArrayReader with DataView XTemplates
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jul 27, 2012, 6:12 PM
  2. Replies: 4
    Last Post: Mar 20, 2012, 1:27 PM
  3. why can not DataBind?
    By diywindow in forum 1.x Help
    Replies: 7
    Last Post: Dec 09, 2010, 8:50 AM
  4. Replies: 2
    Last Post: May 26, 2010, 11:58 PM
  5. [CLOSED] ReaderID in ArrayReader
    By tdracz in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 13, 2009, 3:15 PM

Posting Permissions