使用JQuery将事件添加到gird中存在的链接 [英] Adding event to link present in gird using JQuery

查看:85
本文介绍了使用JQuery将事件添加到gird中存在的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,
我想在单击网格编辑按钮时显示面板,如何绑定此事件以编辑链接.

我尝试了以下操作,但没有成功

rowdatabound event中,我试图绑定javascript函数popUp

Hello Friends,
I want to display panel on click of grid edit button, how can i bind this event to edit link.

I tried following, but it did not worked

In rowdatabound event, I tried to bind javascript function popUp

Private Sub gvJobs_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvJobs.RowDataBound
        If IsDBNull(e.Row.DataItem) Then
            Return
        End If
        If e.Row.RowType = DataControlRowType.DataRow Then
            Dim lnkEdit As New HtmlAnchor
            Dim gvRow As GridViewRow
            gvRow = e.Row
            lnkEdit = gvRow.FindControl("lnkEdit")
            lnkEdit.Attributes("onclick") = "popUp()"
        End If
        
    End Sub



我写了javascript function popUp



I wrote javascript function popUp

<script language="javascript" type="text/javascript">
        function popUp() {
            $(''#divEdit'').sidetoggle(fast);
        }
    </script>



我可以知道我要去哪里了吗,还是有其他方法可以执行此任务.我正在使用母版页.

在此先感谢



May i know where I''m going wrong, or is there any other way to carry out this task. I''m using master pages.

Thanks in advance

推荐答案

(''#divEdit'').sidetoggle(fast); } </script>
(''#divEdit'').sidetoggle(fast); } </script>



我可以知道我要去哪里了吗,还是有其他方法可以执行此任务.我正在使用母版页.

在此先谢谢



May i know where I''m going wrong, or is there any other way to carry out this task. I''m using master pages.

Thanks in advance



看到我的答案
显示弹出式窗口,其中带有就像在datagrid中一样 [
see my answer at

Display popup with a like in datagrid[^]

Thanks.



您需要查看jQuery Popup Modal Dialog Plugins

http://choosedaily.com/1178/15-jquery-popup-modal-dialog-plugins-tutorials/http://choosedaily.com/1178/15-jquery-popup-modal-dialog -plugins-tutorials/
Hi
You need to look jQuery Popup Modal Dialog Plugins

http://choosedaily.com/1178/15-jquery-popup-modal-dialog-plugins-tutorials/http://choosedaily.com/1178/15-jquery-popup-modal-dialog-plugins-tutorials/


这篇关于使用JQuery将事件添加到gird中存在的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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