0
votes

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?

2

2 Answers

0
votes

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

0
votes

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!