1. #1
    Sencha User
    Join Date
    Oct 2009
    Location
    Toronto
    Posts
    25
    Vote Rating
    0
    Natkeeran is on a distinguished road

      0  

    Default add grid row - o is undefined debug error

    add grid row - o is undefined debug error


    Hello All:

    I am writing a script to load a grid with items selected from another gird. The example is here:

    http://pssnet.com/~devone/extjs3/loadSelection.html

    It seems to work, except that it throws a debug error (in firebug) : 'o is undefined'.

    I do need to get these items from the new grid.
    Why is it saying json is null?

    Thank you.

  2. #2
    Sencha User carol.ext's Avatar
    Join Date
    Jun 2007
    Location
    Littleton, Colorado, USA
    Posts
    698
    Vote Rating
    28
    carol.ext has a spectacular aura about carol.ext has a spectacular aura about

      0  

    Default


    You seem to be calling loadData() without passing a parameter (the json). Looks like you changed your mind about constructing the json and calling loadData but did not remove the call.

    Code:
     Test2EditorGrid.on('rowclick', function (TestEditorGrid, rowIndex, e) {
        var row = Test2EditorGrid.getView().getRow(rowIndex);
        var record = Test2DataStore.getAt(rowIndex);
        var ProductName = record.get('ProductName');
        var PriceEconomic = record.get('PriceEconomic');
        alert(ProductName + PriceEconomic);
        var TempJson = '{"Items": [{"ProductName": "' + ProductName + '","PriceEconomic":"' + PriceEconomic + '"}]}';
    
        Test3DataStore.add(new Item({
            ProductName: ProductName,
            PriceEconomic: PriceEconomic
        }));
        Test3DataStore.loadData(); <-----
    
    });

  3. #3
    Sencha User
    Join Date
    Oct 2009
    Location
    Toronto
    Posts
    25
    Vote Rating
    0
    Natkeeran is on a distinguished road

      0  

    Default That worked

    That worked


    Thanks. Thats it. I just removed that line.

Thread Participants: 1