EXT Form 提交时校验Grid中字段是否为空

                              var input=[];
                             if(queryStore.getCount()>0){for(var i=0;i            {
           var record = queryStore.getAt(i);
           if(record.get("inname")==undefined || record.get("inname")==''){
           Ext.MessageBox.show({
                   title:'提示',
                   msg:'
发布名称不能为空!
',
                      buttons:{"ok":"确定"},
                      fn:function(e){
                     queryGrid.startEditing(i, 1);
                      },
                   width:200
                   });
           return false;
           }
         }
           
           input.push(record);
           }
                  var inputJson = [];
                  Ext.each(input, function(item) {inputJson.push(item.data);});
                  }

你可能感兴趣的:(JS)