如何在单击取消时禁用验证 [英] how to disable validation on clicking cancel

查看:72
本文介绍了如何在单击取消时禁用验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
我正在单元格编辑模式下进行批处理编辑,因为在单击取消"字段验证器时,可以帮助我如何禁用该验证器的取消"按钮.我尝试了此编码,但无法正常工作

像这样,我创建了保存和取消按钮

Hi all
am working on batch editing inCell edit mode in that while clicking cancel field validators are firing can any help me how to disable that validators for cancel button. I tried this coding but not properly working

Like this I have create save and cancel buttons

<div class="resource_right_menu_new">
<div>
   <a href="#" id="btnSave">SAVE</a></div>
<div>
  <a href="#" id="btnCancel" > CANCEL</a></div>
</div>



我的JavaScript函数



My javascript function

$('#btnCancel').click(function( ) {
   $('#btnCancel').CausesValidation = false;
     var grid = $( "#grdLists" ).data( "tGrid" );
      grid.ajaxRequest( );
  });


我尝试了上面的编码,但现在也触发了验证.有什么可以帮助我摆脱这个问题的吗?


I tried the above coding but now also it firing validations. can any help me to get out of this problem

推荐答案

(' 函数(){
('#btnCancel').click(function( ) {


(#btnCancel').CausesValidation = var 网格=
('#btnCancel').CausesValidation = false; var grid =


(" ).data(" ); grid.ajaxRequest(); });
( "#grdLists" ).data( "tGrid" ); grid.ajaxRequest( ); });


我尝试了上面的编码,但现在也触发了验证.有什么可以帮助我摆脱这个问题的吗?


I tried the above coding but now also it firing validations. can any help me to get out of this problem


这篇关于如何在单击取消时禁用验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆