-
30 Nov 2009 12:40 AM #31
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
-
30 Nov 2009 12:55 AM #32
-
4 Dec 2009 10:56 AM #33
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 Dec 2009 10:59 AM #34
Nevermind misread the function parameters. Was using the one for the gridcolumn. The one for the grid should be this.addColumn('C','C',0);
-
28 Dec 2009 2:02 AM #35Jozef Sakalos, aka Saki
A lot of valuable info at:
Saki's Extensions and Plugins
Saki's Extensions and Plugins Docs
Saki's Examples, Latest: Grid in Card Layout
Saki's Blog, Featured: Writing a Big Application in Ext, Latest: Grid MultiSearch Plugin Video
-
31 Dec 2009 12:34 AM #36
-
10 Jan 2010 9:28 PM #37
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):
So my fix: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; }
CheersCode: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(); } });
-
10 Jan 2010 10:37 PM #38
-
10 Jan 2010 10:58 PM #39
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
-
1 Mar 2010 12:41 PM #40


Reply With Quote

