我想通过单击位于网格视图中的链接按钮来打开modelpopupextender [英] i want to open modelpopupextender on the click of linkbutton situated in gridview

查看:69
本文介绍了我想通过单击位于网格视图中的链接按钮来打开modelpopupextender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过单击位于gridview中的链接按钮来打开modelpopupextender.
帮助我

i want to open modelpopupextender on the click of linkbutton situated in gridview.
help me

推荐答案

<asp:GridView ID="GridViewNotes" runat="server" OnRowCommand="GridViewNotes_RowCommand">
<Columns>
<asp:TemplateField HeaderText="Notes">
<ItemTemplate>
<asp:LinkButton ID="lnkbtnNotesTitle" runat="server" CommandName="OpenMPE" CommandArgument='<%# DataBinder.Eval (Container.DataItem, "WhateverYouWantToPass") %>' ></asp:LinkButton>
</ItemTemplate>
<HeaderStyle CssClass="first" Width="48%" />
<ItemStyle HorizontalAlign="Left" Width="48%" />
</asp:TemplateField>
</Columns>
<AlternatingRowStyle CssClass="alt" />
</asp:GridView>


protected void GridViewNotes_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
if (e.CommandName == "OpenMPE")
{
ModalPopupViewNotes.Show();
}
}


帕拉维,

将您的modalpopup扩展程序放置在页面中,但不要提供ant targetcontrol ID或放置一个按钮使其不可见,并将此按钮作为modalpopup扩展程序的targetcontrol.在javascript或后面的代码中,在gridview中单击链接按钮时,您可以通过调用ur的show()方法(例如modalpopupextender1.Show())来显示ur modal.

希望这会有所帮助

最好的问候,
斯里曼(Sriman)
Hi Pallavi,

Place your modalpopup extender in your page but dont give ant targetcontrol ID or place a button and make it invisible and give this button as targetcontrol of modalpopup extender. On click of your link button in gridview either in javascript or in code behind you show ur modal by calling its show() method eg.modalpopupextender1.Show().

Hope this helps

Best Regards,
Sriman


查看此链接
可能对您有帮助

http://forums.asp.net/t/1559232.aspx [
See this link
may help you

http://forums.asp.net/t/1559232.aspx[^]


这篇关于我想通过单击位于网格视图中的链接按钮来打开modelpopupextender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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