1. #1
    Ext User
    Join Date
    Mar 2007
    Posts
    1
    Vote Rating
    0
    alcarx is on a distinguished road

      0  

    Default Cannot display 0 in grid

    Cannot display 0 in grid


    a column such as id, cannot display 0, but can display other numbers such as 1, 2

    don't know whether it is because
    in JSONDataModel.js, loadData, var val = node[fields[j]]|| ""
    ..


    I am not very familiar with javascript, thanks

    ..Solved this by using a custom renderer

  2. #2
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    Tampa, FL
    Posts
    6,955
    Vote Rating
    17
    jack.slocum will become famous soon enough jack.slocum will become famous soon enough

      0  

    Default


    Here's a patch. Thanks for reporting it.

    Code:
    YAHOO.ext.grid.JSONDataModel.prototype.loadData = function(data, callback, keepExisting){
    	var idField = this.schema.id;
    	var fields = this.schema.fields;
    	var rowData = [];
    	try{
    	    var root = eval('data.' + this.schema.root);
    		for(var i = 0; i < root.length; i++){
    			var node = root[i];
    			var colData = [];
    			colData.node = node;
    			colData.id = (typeof node[idField] != 'undefined' && node[idField] !== '' ? node[idField] : String(i));
    			for(var j = 0; j < fields.length; j++) {
    			    var val = node[fields[j]];
    			    if(typeof val == 'undefined'){
    			        val = '';
    			    }
    	            if(this.preprocessors[j]){
    	                val = this.preprocessors[j](val);
    	            }
    	            colData.push(val);
    	        }
    	        rowData.push(colData);
    		}
    		if(keepExisting !== true){
    		  this.removeAll();
    		}
            this.addRows(rowData);
        	if(typeof callback == 'function'){
    	    	callback(this, true);
    	    }
        	this.fireLoadEvent();
    	}catch(e){
    		this.fireLoadException(e, null);
    		if(typeof callback == 'function'){
    	    	callback(this, false);
    	    }
    	}
    };

Similar Threads

  1. Unable to display json data in grid
    By mhuibers in forum Ext 1.x: Help & Discussion
    Replies: 38
    Last Post: 12 Mar 2009, 11:59 AM
  2. grid.view.focusCell() display bug
    By papasi in forum Ext 1.x: Bugs
    Replies: 3
    Last Post: 8 Mar 2007, 9:24 PM
  3. LayoutDialog + Grid + toolbar display bug?
    By seldon in forum Ext 1.x: Bugs
    Replies: 13
    Last Post: 14 Dec 2006, 2:23 AM
  4. grid toolbar display issues in IE
    By sjivan in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 4 Dec 2006, 10:16 PM
  5. problem with paged grid display
    By jbowman in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 27 Sep 2006, 5:07 PM

Thread Participants: 1

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