Вопрос

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

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!

Другие советы

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top