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

Grid reload then remove selected row error

Published by: mike 2010-03-11
  • see this thread
    http://extjs.com/forum/showthread.php?t=12193&highlight=indexOf

    if you select one or some row(s), reload datastore then remove selected row(s) ,an error occured!

    ds.reload();
    rec=model.getSelected();
    if(rec) ds.remove(rec);


  • If you can't access SVN, add this to your script. It is the fixed function from SVN. It must be executed AFTER ext-all.js has loaded.


    Ext.override(Ext.grid.RowSelectionModel, {
    onRefresh : function(){
    var ds = this.grid.dataSource, index;
    var s = this.getSelections();
    this.clearSelections(true);
    for(var i = 0, len = s.length; i < len; i++){
    var r = s[i];
    if((index = ds.indexOfId(r.id)) != -1){
    this.selectRow(index, true);
    }
    }
    }
    });


  • The selection model tracks the GridView rather than the store. If a record which the same id is loaded, I definitely see where the problem could occur. Please check the version in SVN and let me know if it resolves the issue for you.


  • I think there is a bug in the Grid.

    If the Store is reloaded, it fires "datachanged". The GridView handles that event, and updates the UI, but the Grid's SelectionModel is unaffected by this and its Array of selected Records is unchanged and obsolete.

    The SelectionModel also needs to know when the data has changed.

    It could either remove all selections, or reselect the same row numbers that were previously selected depending on a config option.

    yes!,use this code before bug fixed!

    var id=rec.get("id");
    rec=ds.getById(id);
    index=ds.indexOf(rec);
    model.deselectRow(index);
    model.selectRow(index);
    rec=model.getSelected();
    ds.remove(rec);


  • I think there is a bug in the Grid.

    If the Store is reloaded, it fires "datachanged". The GridView handles that event, and updates the UI, but the Grid's SelectionModel is unaffected by this and its Array of selected Records is unchanged and obsolete.

    The SelectionModel also needs to know when the data has changed.

    It could either remove all selections, or reselect the same row numbers that were previously selected depending on a config option.


  • yes,this patch is useable!





  • Allergies.. no relief?!?
    Religion in the workplace?
  • submitting a screenplay
  • how can i fix my xbox 360 red ring of death rrod
  • does anybody know all the cheats for grand theft auto san andres on playstation 2
  • x box 360 question
  • which playstation 3 should i get
  • do you think this is a good plot
  • where can i buy a ps3 80gb
  • plot ideas for story
  • will shephenie meyer end the postpone on midnight sun
  • how to turn the water off for a tub
  • do you apply what you learned in school to your personal life
  • is there such thing as an extension cord for a 220 plug
  • is there something wrong with the fan
  • is call of duty world at war wii the same as call of duty 4 ps3 or just similar
  •  
  • ps3 won 039 t read disks
  • why does my fridge freezer not work in my garage when its cold
  • author 039 s who write horror books for agers
  • will i get banned for redeeming so many codes
  • which xbox 360 and xbox original games should i buy
  • what are the best wii games for girls
  • can you play the wii with one hand
  • should i buy a wii or an xbox 360
  • what model of keytar does madonna wayne gacy play in the beautiful people and other marilyn manson songs
  • when will shephenie meyer publish midnight sun
  • i want to redo my education at the age of 22 has anybody here been in the same boat
  • new xbox 360 controllers
  • xbox 360 help please d
  • my girl friend need a y rock or pop song
  • help xbox 360 picture is in black and white
  • 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 Grid reload then remove selected row error , 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