Question

I have a GridPanel with a CheckColumn. I need to disable the entire row if the checkbox is unchecked when data loads, preventing data modification entirely. I tried using the getRowClass method in the viewConfig as follows:

        viewConfig: {
            getRowClass: function (record, rowIndex, rowPrms, ds) {
                //If the Sign-Off checkbox is unchecked, disable entire row.
                if (record.get('signOff') == 0) return 'disabled-row';
            }
        }

This does not work. Any pointers?

Was it helpful?

Solution 2

I discovered that the checkColumn does not have a checkBox object in it. It only plays with various images of checkboxes checked/unchecked using css. I created my own disabled versions of checkbox images, added some custom css, and loaded them conditionally in the renderer of the checkColumn.Prototype. Problem solved!

OTHER TIPS

To reflect your change. you need to include one config which is disableSelection : true in the grid.

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