Ext.Net 1.x_Ext.Net.GridPanel行按钮高亮否

 JS:

var prepare = function (grid, toolbar, rowIndex, record) {
                var firstButton = toolbar.items.get(0);
                var SecondButton = toolbar.items.get(1);
                var fourthButton = toolbar.items.get(2);
                if (record.data.Surplus < 1 || record.data.IsCompulsory=='Y') {
                    firstButton.setDisabled(true);
                    firstButton.setTooltip('对不起已经被选完或者此课程为必修课!');
                }
                if (record.data.IsCompulsory == 'N') {
                    fourthButton.setDisabled(true);
                    fourthButton.setTooltip('此课程为选修课您不能操作此功能!');
                }
                if (record.data.Count <1) {
                    SecondButton.setDisabled(true);
                    SecondButton.setTooltip('此课程暂无人员选修!');
                }
            }


Ext.Net 1.x_Ext.Net.GridPanel行按钮高亮否_第1张图片

你可能感兴趣的:(function)