[英]Page_validators in grid for client side validation
Hi i am using Page_Validators
to validate some text boxes before bind into grid. 您好我在绑定到网格之前使用Page_Validators
验证一些文本框。
My actual requirement is that I have two grids on same page. 我的实际要求是我在同一页面上有两个网格。 If i took Page_Validators
from the DOM it contains total validators in pages. 如果我从DOM中Page_Validators
,它在页面中包含总验证器。 How can I identity this validator for particular grid? 如何识别特定网格的验证器?
Anyone please help me stuck with this. 有人请帮助我坚持这一点。
Thanks . 谢谢 。
In a general sense, you can figure out the parent of an object by using jQuery's .parents()
function: 在一般意义上,您可以使用jQuery的.parents()
函数.parents()
对象的父级:
HTML-- HTML--
<div class="parent">
<div>
<div class="child"></div>
</div>
</div>
JS-- JS--
var $the_parent = $('.child').parents('.parent');
This will traverse through the .child
element's ancestors until it finds the .parent
element. 这将遍历.child
元素的祖先,直到找到.parent
元素。
You can find documentation for .parents()
here: http://api.jquery.com/parents 你可以在这里找到.parents()
文档: http : .parents()
Without more information about your problem I can't help much. 没有关于你的问题的更多信息我无能为力。 Some posted code on jsfiddle or a link to your live site would be helpful. 一些在jsfiddle上发布的代码或指向您的实时网站的链接会很有帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.