extjs Ext.grid.plugin.CellEditing的validateedit事件,两个值相同,不能做为判断依据
 1 var rowEditing = Ext.create('Ext.grid.plugin.CellEditing', {
 2         clicksToMoveEditor: 1,
 3         autoCancel: false,
 4      
 5                     listeners:{
 6 //                        'edit':{
 7 //                            fn: function(editor, e){
 8 //                                 var i = parseInt(e.value);
 9 //                                 if(e.value > 100)
10 //                                 {
11 //                                    
12 //                                    return false;
13 //                                 }
14 //                            }
15 //                        }
16 //                        ,
17                         validateedit:{
18                             fn:function(editor,e){
19                             
20                                 var i = parseInt(e.value);
21                                 if(e.value > 100)
22                                 {
23                                     //e.cancle = true;
24                                     return false;
25                                 }
26                             }  
27                         }
28                    }
29         
30     });

 

posted on 2012-06-01 08:24  白沙河  阅读(1638)  评论(0编辑  收藏  举报