1. #31
    Sencha User
    Join Date
    Oct 2009
    Posts
    33
    Vote Rating
    0
    wwwjsx is on a distinguished road

      0  

    Default


    Condor

    thank you for your sharing code. I have problem when I using the colIndex it is not possible to touch the added column. I am trying manually switch off the added column.

    see:
    http://my.jetscreenshot.com/demo/20091130-guuz-1kb.jpg

    If i use withour colIndex works very fine

  2. #32
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    87
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Quote Originally Posted by wwwjsx View Post
    I have problem when I using the colIndex it is not possible to touch the added column.
    Are you sure you didn't configure the column with fixed:true or hideable:false?

    Otherwise, can you post an example?

  3. #33
    Sencha User
    Join Date
    Sep 2009
    Posts
    112
    Vote Rating
    0
    asagala is on a distinguished road

      0  

    Default


    Trying to add a column as the first column in the grid by doing this

    this.addColumn(0,'C'); -> this. is my grid

    but it always adds it to the end. Anyone have a clue?

  4. #34
    Sencha User
    Join Date
    Sep 2009
    Posts
    112
    Vote Rating
    0
    asagala is on a distinguished road

      0  

    Default


    Nevermind misread the function parameters. Was using the one for the gridcolumn. The one for the grid should be this.addColumn('C','C',0);

  5. #35
    Sencha - Community Support Team jsakalos's Avatar
    Join Date
    Apr 2007
    Location
    Slovakia
    Posts
    27,520
    Vote Rating
    376
    jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future jsakalos has a brilliant future

      0  

    Default


    Quote Originally Posted by jgarcia@tdg-i.com View Post
    i think this should be added to the base!
    +1
    Jozef Sakalos, aka Saki

    Education, extensions and services for developers at new http://extjs.eu
    News: Grid Search Plugin, ExtJS 5 Complex Data Binding using MVVM


  6. #36
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,669
    Vote Rating
    110
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    +1

  7. #37
    Sencha User Izhaki's Avatar
    Join Date
    Apr 2009
    Location
    London
    Posts
    118
    Vote Rating
    13
    Izhaki will become famous soon enough

      0  

    Default


    Hi,

    Firstly, thank Condor for this.

    Then, +1 here as well, but before:

    The provided code could break JsonReader/XmlReader calls since buildExtractors is not called. It's a bit odd since sometimes it works, other times it throws load exception or just doesn't load the values. This is due to this (JsonReader):

    Code:
        extractValues : function(data, items, len) {
            var f, values = {};
            for(var j = 0; j < len; j++){
                f = items[j];
                var v = this.ef[j](data);
                values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, data);
            }
            return values;
        }
    So my fix:

    Code:
    Ext.override(Ext.data.Store,{
      addField: function(field){
        field = new Ext.data.Field(field);
        this.recordType.prototype.fields.replace(field);
        if(typeof field.defaultValue != 'undefined'){
          this.each(function(r){
            if(typeof r.data[field.name] == 'undefined'){
              r.data[field.name] = field.defaultValue;
            }
          });
        }
        delete this.reader.ef;
        this.reader.buildExtractors();
      },
      removeField: function(name){
        this.recordType.prototype.fields.removeKey(name);
        this.each(function(r){
          delete r.data[name];
          if(r.modified){
            delete r.modified[name];
          }
        });
        delete this.reader.ef;
        this.reader.buildExtractors();
      }
    });
    Cheers

  8. #38
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    87
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Quote Originally Posted by Izhaki View Post
    The provided code could break JsonReader/XmlReader calls since buildExtractors is not called. It's a bit odd since sometimes it works, other times it throws load exception or just doesn't load the values.
    Wouldn't it be better to return metaData from the server? In that case the fields and the data are always in sync.

  9. #39
    Sencha User Izhaki's Avatar
    Join Date
    Apr 2009
    Location
    London
    Posts
    118
    Vote Rating
    13
    Izhaki will become famous soon enough

      0  

    Default


    Sure,

    metaData will solve this. But if this mod is to be added to the base, I thought I should report this issue/fix.

    Also, it took me 4 hours to work out what's wrong, so to save the time for other people...

    Cheers

  10. #40
    Ext User
    Join Date
    Jun 2008
    Location
    Egypt
    Posts
    8
    Vote Rating
    1
    kamalhg is on a distinguished road

      0  

    Smile


    this fix makes the extension works with 3.1.x

    Quote Originally Posted by Izhaki View Post
    Hi,

    Firstly, thank Condor for this.

    Then, +1 here as well, but before:

    The provided code could break JsonReader/XmlReader calls since buildExtractors is not called. It's a bit odd since sometimes it works, other times it throws load exception or just doesn't load the values. This is due to this (JsonReader):

    Code:
        extractValues : function(data, items, len) {
            var f, values = {};
            for(var j = 0; j < len; j++){
                f = items[j];
                var v = this.ef[j](data);
                values[f.name] = f.convert((v !== undefined) ? v : f.defaultValue, data);
            }
            return values;
        }
    So my fix:

    Code:
    Ext.override(Ext.data.Store,{
      addField: function(field){
        field = new Ext.data.Field(field);
        this.recordType.prototype.fields.replace(field);
        if(typeof field.defaultValue != 'undefined'){
          this.each(function(r){
            if(typeof r.data[field.name] == 'undefined'){
              r.data[field.name] = field.defaultValue;
            }
          });
        }
        delete this.reader.ef;
        this.reader.buildExtractors();
      },
      removeField: function(name){
        this.recordType.prototype.fields.removeKey(name);
        this.each(function(r){
          delete r.data[name];
          if(r.modified){
            delete r.modified[name];
          }
        });
        delete this.reader.ef;
        this.reader.buildExtractors();
      }
    });
    Cheers

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi