ENART.POLALA.COM
welcome to my space
X
Coffee | Sexuality | Medicine | Elderly Care | Soccer | Insurance | Small Business | Exotic Locations | Related articles

Bug in Store.insert/add with filter?

Published by: jack 2010-03-11
  • I have two grids in a master and detail relation.

    When ever the first grids row is clicked the second grid is refreshed with the pertaining child records, for which i use Store.filter(). See Image1.gif

    When ever the user clicks on New in the toolbar, a row gets added to the child grid. So far so good. See Image2.gif

    But as soon as i navigate to any other record in the parent grid and come back to the original parent record the newly added row is gone.

    After much of banging my head, i found that since i am using filter in the second data store, before i insert a row in it i need to clear the filter. Is this a bug or what? and what about performance implications when handling large data.

    Code that doesnt work:

    function newClicked() {
    stateMaster_grid.stopEditing();
    // stateMasterStore.clearFilter();
    stateMasterStore.insert (0, new Ext.data.Record({
    countryCode: selectedCountryCode, //global variable that holds the parent grid clicked country code
    recCode: -1,
    theName: 'New',
    activeFlag: 1
    }));
    stateMaster_grid.startEditing (0, 0);
    // stateMasterGridRefresh(); //function to refresh child grid everytime a row in the master grid is clicked
    }


    Code that works:

    function newClicked() {
    stateMaster_grid.stopEditing();
    stateMasterStore.clearFilter();
    stateMasterStore.insert (0, new Ext.data.Record({
    countryCode: selectedCountryCode, //global variable that holds the parent grid clicked country code
    recCode: -1,
    theName: 'New',
    activeFlag: 1
    }));
    stateMaster_grid.startEditing (0, 0);
    stateMasterGridRefresh();
    }


    stateMasterGridRefresh Function:

    function stateMasterGridRefresh () {
    stateMasterStore.filter ('countryCode', selectedCountryCode);
    };


    Any suggestions or am i doing something wrong!!


  • This has been covered in the past. Try searching for 'snapshot'


  • Thanks i will





  • Allergies.. no relief?!?
    Religion in the workplace?
  • katrina s wrath
  • hang ten
  • protected
  • holiday spots on the gothic tour
  • lensbaby at the cemetery
  • holiday spots on the gothic tour
  • the showroom
  • deep in the dark woods
  • sacred
  • the showroom
  • another stone for chilly
  • another stone for chilly
  • deep in the dark woods
  • more for chillers collection
  •  
  • first post on the dark side
  • lensbaby at the cemetery
  • weird rocks stacked
  • untitled
  • sacred
  • weird rocks stacked
  • hang ten
  • oh boy
  • dark trees
  • katrina s wrath
  • dark trees
  • protected
  • first post on the dark side
  • cool cemetaries
  • cool cemetaries
  • Search:  
    #If you have any other info about this subject , Please add it free.#
    Your name:
    E-mail:
    Telphone:

    Your comments:


    If you have any other info about Bug in Store.insert/add with filter? , Please add it free.

    About us -Site map -Advertisement -Jion us -Contact usExchange linksSponsor us
    Copyright© 2008 enart.polala.com All Rights Reserved
    Site made&Support support@enart.polala.com    E-mail: web@enart.polala.com