Question

I've got an app that I was upgrading to SDK version rc2 from p5. It overrides the getRowClass() function in the viewConfig to change the row color setting the class if there is a tool tip displayed as per the code below...but this code for some reason seems to be broken in rc1 and rc2.

In p5, this function is called once per row (which I can see when it hits the console.log), but does not seeem to be called in rc1/rc2.

Can anybody confirm whether this is a defect is rc2, or a feature that is no longer being supported?

    var grid = {
        xtype:              'rallygrid',
        showPagingToolbar:  false,
        disableColumnMenus: false,
        store:              this.gridDataStore,
        viewConfig: { 
            getRowClass: function(record) {
                var toolTip = record.get('ToolTip');

                console.log('checking tooltip', record);

                return toolTip !== null ? 'special-row' : 'normal-row'; 
            },
            listeners: { render: this._createToolTip }
        },
        columnCfgs: this.columnCfgs,
        border: 1
    };
Was it helpful?

Solution

This is due to a defect in the grid where we are blindly overriding the getRowClass function on the viewConfig w/o checking to make sure there wasn't one there already. Hopefully this defect will be fixed soon. Check out my answer to this other, very similar question: https://stackoverflow.com/a/17891138/728184

You should be able to have your getRowClass function win out by setting it in the beforerender event listener (thereby re-clobbering the one that we put on there, which is really only useful for automated testing anyway and not required in any way for the grid to function correctly).

UPDATE:

I just fixed this in the nightly build, so this should no longer be an issue in public sdk builds beginning with the next public release after 2.0rc2.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top