1. 程式人生 > >ext gridpanel中操作按鈕隱藏和不能點選

ext gridpanel中操作按鈕隱藏和不能點選

 function prepare(grid, toolbar, rowIndex, record) {
            var editButton2 = toolbar.items.get(0);
            var delButton2 = toolbar.items.get(2);
            var tjButton = toolbar.items.get(4);
            if (record.data.State != "0") {
                editButton2.setDisabled(true);
                tjButton.setDisabled(true);                 delButton2.hide();
            }         }