1. #1
    Sencha User
    Join Date
    Apr 2013
    Posts
    7
    Answers
    2
    Vote Rating
    -1
    quintenvk is an unknown quantity at this point

      0  

    Default Answered: getRowClass removes gridpanel rows completely

    Answered: getRowClass removes gridpanel rows completely


    I currently define an Ext.grid.GridPanel component where I'm applying the following viewConfig in the constructor of the defined component:

    Code:
    this.viewConfig = {
                getRowClass : function (row, index) {
                    return 'row-error';  //should be conditional in production, of course
                }
            };
    The problem is that, if i use this function, no rows are displayed. They aren't even present in the <tbody>-tag in the HTML.

    When I try the following, all rows are normal:
    Code:
    this.viewConfig = {};
    Can anyone explain what i'm doing wrong? I don't have any css defined for this so far, but surely that shouldn't matter as the html elements should at least be present in the source?
    Last edited by quintenvk; 7 May 2013 at 6:37 AM. Reason: formatting

  2. Fixed, the problem was in ext3-compat.js. Anyone who bumps into this problem, the error is on line 973, see this code:

    Code:
    this.getRowClass = function(rec, rowIndex, rowParams, store){
                            var result = this.__getRowClass(rec, rowIndex, rowParams, store);
                            if (rowParams && rowParams.body) {
                                delete rowParams.body;
                                breaking({pkg:'Ext.grid.View', member:'getRowClass.rowParams.body', single:true,
                                    msg:'To implement a custom row body you must add the RowBody feature (ftype:"rowbody") '+
                                        'to the grid\'s viewConfig and override the "getAdditionalData" template method '+
                                        '(or use the Ext.grid.RowBodyPlugin helper class). Unfortunately this cannot be '+
                                        'inferred at design time so it must be fixed manually.'});
                            }
                            if (rowParams && rowParams.bodyStyle) {
                                delete rowParams.bodyStyle;
                                deprecate({pkg:'Ext.grid.View', member:'getRowClass.rowParams.bodyStyle', single:true,
                                    msg:'To implement custom row styles you must add the RowBody feature (ftype:"rowbody") '+
                                        'to the grid\'s viewConfig and override the "getAdditionalData" template method '+
                                        '(or use the Ext.grid.RowBodyPlugin helper class). Note that in 3.x this property '+
                                        'was a CSS style spec, whereas now you specify "rowBodyCls" as a CSS classname instead. Ignoring for now.'});
                            }
                            if (rowParams && rowParams.tstyle) {
                                delete rowParams.tstyle;
                                deprecate({pkg:'Ext.grid.View', member:'getRowClass.rowParams.tstyle', single:true,
                                    msg:'Grid row bodies no longer use a wrapping TABLE element, so the "tstyle" property '+
                                        'no longer directly applies. If you have CSS styles that still need to be applied, you '+
                                        'should add the RowBody feature (ftype:"rowbody") to the grid\'s viewConfig and override '+
                                        'the "getAdditionalData" template method (or use the Ext.grid.RowBodyPlugin helper class). '+
                                        'Note that in 3.x this property was a CSS style spec, whereas now you would use the "rowBodyCls" '+
                                        'CSS classname instead (and adjust for the fact that there is no TABLE if needed). Ignoring for now.'});
                            }
                            return result;
                        };

  3. #2
    Sencha User
    Join Date
    Apr 2013
    Posts
    7
    Answers
    2
    Vote Rating
    -1
    quintenvk is an unknown quantity at this point

      0  

    Default


    Fixed, the problem was in ext3-compat.js. Anyone who bumps into this problem, the error is on line 973, see this code:

    Code:
    this.getRowClass = function(rec, rowIndex, rowParams, store){
                            var result = this.__getRowClass(rec, rowIndex, rowParams, store);
                            if (rowParams && rowParams.body) {
                                delete rowParams.body;
                                breaking({pkg:'Ext.grid.View', member:'getRowClass.rowParams.body', single:true,
                                    msg:'To implement a custom row body you must add the RowBody feature (ftype:"rowbody") '+
                                        'to the grid\'s viewConfig and override the "getAdditionalData" template method '+
                                        '(or use the Ext.grid.RowBodyPlugin helper class). Unfortunately this cannot be '+
                                        'inferred at design time so it must be fixed manually.'});
                            }
                            if (rowParams && rowParams.bodyStyle) {
                                delete rowParams.bodyStyle;
                                deprecate({pkg:'Ext.grid.View', member:'getRowClass.rowParams.bodyStyle', single:true,
                                    msg:'To implement custom row styles you must add the RowBody feature (ftype:"rowbody") '+
                                        'to the grid\'s viewConfig and override the "getAdditionalData" template method '+
                                        '(or use the Ext.grid.RowBodyPlugin helper class). Note that in 3.x this property '+
                                        'was a CSS style spec, whereas now you specify "rowBodyCls" as a CSS classname instead. Ignoring for now.'});
                            }
                            if (rowParams && rowParams.tstyle) {
                                delete rowParams.tstyle;
                                deprecate({pkg:'Ext.grid.View', member:'getRowClass.rowParams.tstyle', single:true,
                                    msg:'Grid row bodies no longer use a wrapping TABLE element, so the "tstyle" property '+
                                        'no longer directly applies. If you have CSS styles that still need to be applied, you '+
                                        'should add the RowBody feature (ftype:"rowbody") to the grid\'s viewConfig and override '+
                                        'the "getAdditionalData" template method (or use the Ext.grid.RowBodyPlugin helper class). '+
                                        'Note that in 3.x this property was a CSS style spec, whereas now you would use the "rowBodyCls" '+
                                        'CSS classname instead (and adjust for the fact that there is no TABLE if needed). Ignoring for now.'});
                            }
                            return result;
                        };

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