Results 1 to 2 of 2

Thread: store, on reload bug

  1. #1

    Default store, on reload bug

    Hi,

    well I'm new to Ext-js as well.

    I've got the following problem:

    I have two grids, wich I connected to each other.
    When changing selection on grid1 the store of grid2 is being updated.

    All works fine as long as the store2 for grid2 gets records.
    If the return array (to store2) doesn't contain records, it simply keeps the last set.

    Any idea?

    here are some code parts:
    Code:
                var Grid1Ds = new Ext.data.Store
                    (
                        {
                            proxy: new Ext.data.HttpProxy({url: 'data.php'}),
                            reader: new Ext.data.JsonReader
                            (
                                {
                                    root: 'targets',
                                    totalProperty: 'totalCount',
                                    id: 'id'
                                },
                                [
                                    {name: "id", mapping: 'id', type: 'int'},
                                    {name: "targetType", mapping: 'targetType', type: 'string'},
                                    {name: "targetTypeInstanceId", mapping: 'targetTypeInstanceId', type: 'int'},
                                    {name: "targetInstanceName", mapping: 'targetInstanceName', type: 'string'}
                                ]
                            ),
                            baseParams: 
                            {
                                method: "GET",
                                node: "target_product"
                            },
                            remoteSort: false
                        }
                    );
    
    
    
                grid1.addListener
                (
                    'click', 
                    function(e)
                    {                        
                        Grid2.getDataSource().baseParams['node'] = 'selection_'+grid1.getSelectionModel().getSelected().id;
                        Grid2.getDataSource().reload();
                    }
                );
    Last edited by mystix; 9 Aug 2007 at 7:52 AM. Reason: for the n-th time, use [code][/code] tags...

  2. #2
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,232

    Default

    [ moved from Bugs to Help]

    please read https://forum.sencha.com/forum/showthread.php?t=8887 before posting in bugs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •