Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/387.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在剑道网格中应用过滤器后,jQuery单击按钮不起作用_Javascript_Jquery_Kendo Grid - Fatal编程技术网

Javascript 在剑道网格中应用过滤器后,jQuery单击按钮不起作用

Javascript 在剑道网格中应用过滤器后,jQuery单击按钮不起作用,javascript,jquery,kendo-grid,Javascript,Jquery,Kendo Grid,我有剑道网格,在一列中包含按钮 首先,click函数起作用,但当我在网格中应用过滤器或可排序时,click不再起作用 这是我的密码 <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function() { // kindo grid initialization jQuery("#grid").kendoGrid({ sortable : tru

我有剑道网格,在一列中包含按钮

首先,click函数起作用,但当我在网格中应用过滤器或可排序时,click不再起作用

这是我的密码

<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function() {

    // kindo grid initialization

    jQuery("#grid").kendoGrid({
        sortable : true,
        resizable : true,
        pageable : {
            pageSize : 7,
            messages : {
                display : "{0}-{1} de {2} demand",
                itemsPerPage : "demand by pages",
                empty : "There are no demand"
            }
        },
        filterable : {
            extra : false,
            messages : {
                filter : "apply",
                clear : "delete",
                info : "Filter :"
            },
            operators : {
                string : {
                    eq : "equal",
                    neq : "not equal",
                    contains : "contains"
                }
            }
        }
    });

    // the input type button that i want to get the click handler 
    // work fine but when i apply filter on the grid it doesn't work any more
    // css class of the input is viewIcon

    jQuery(".viewIcon").click(function(){

        var idDT = this.id;

            jQuery("#consultation").hide().load("../dt/consultation/view.jsp",{id:idDT},function( response, status, xhr ) {

                 // some work
            });

        });
});
</script>
</head>
<title>table</title>
<body >

<div id="bord">
    <table id="grid"  style="width: 98%">
        <colgroup>
            <col/><col style="width: 60px" /><col/><col/><col/><col/><col/>
        </colgroup>
        <thead>
            <tr>
                <th>Numéro d'affaire</th>
                <th>Type</th>
                <th>Etat</th>
                <th>Demandeur</th>
                <th>Responsable projet</th>
                <th>Date de réception</th>
                <th>Actions</th>
            </tr>
        </thead>

        <%--  i get data from an sql query recordset  --%>

        <c:forEach var="dt_r" items="${recordset.rows}">
            <tr>
                <td style="text-align: center">${dt_r.n_aff_proj}</td>
                <td align="center">DT</td>
                <td align="center">${dt_r.etat_dem}</td>
                <td align="center">${dt_r.nom_dem}</td>
                <td align="center">${dt_r.resp_pro}</td>
                <fmt:formatDate var="fmt_date_reception_demande"
                    value="${dt_r.dat_r_d}" pattern="dd/MM/yyyy" />
                <td align="center">${fmt_date_reception_demande}</td>
                <td align="center">
                    <div class="actions">
                        <%--  the actions  --%>

                             <input type="button" title="Consulter DT" class="viewIcon" id="${dt_r.id_dt}" />

                    </div>
            </tr>
        </c:forEach>
    </table>
</div >

<div id="consultation">
</div>
</body>
</html>
请帮忙

这里是JSFIDLE上的链接,您应该为动态创建的元素使用.delegate

。委托将处理程序附加到所有元素的一个或多个事件 根据特定集合,现在或将来匹配选择器的 根元素的类型


thanx@mohamad你救了我的daya现在有另一个bug过滤器一开始工作正常,应用过滤器后操作按钮工作正常。但是当我点击viewIcon按钮时,过滤器不工作,弹出窗口不再显示任何想法。当我点击按钮时,我尝试过滤弹出窗口过滤器不再工作,我收到fireBug TypeError的错误消息:this.popup未定义…n,this.popup | | this.pane | | this.|init,这个._isMobile?这个.窗格.导航这个.v。。。我认为var idDT=this.id的问题;从单击函数查看堆栈溢出中的代码,请提供任何帮助。我可以在不使用此id的情况下获取单击按钮的id。id我尝试删除它,并且除了此id之外是否还有其他方法可以获取id。id使用jQuery:$this.attr'id'或$this.prop'id'
jQuery('#bord').on('click', '.viewIcon', function() {
    alert("yess");          
});