在gridview中执行ajax弹出控件扩展器 [英] Execute ajax popup control extender in gridview

查看:76
本文介绍了在gridview中执行ajax弹出控件扩展器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我的网格视图中有2列. 1是创建约会"列,2是医生的姓名"列.

现在可以在我的gridview中单击创建约会"并执行ajax弹出扩展器吗?或将链接发送给我.

哎呀,我的gridview不使用数据源,而是使用它填充的programaticaly.

Hi
I have 2 columns in my gridview. 1 is Create appointment column and 2 is Doctors''s Name column.

Now is there a way to click "create appointment" in my gridview and execute the ajax popup extender?If so how? or please send me the link.

Ow and my gridview does not use datasource, its populated programaticaly.

推荐答案

使用创建约会"作为按钮字段并提供一些命令名称.
将模态弹出式扩展程序添加到您的页面中,并为"TargetControlID"分配虚拟按钮,使其不显示(因为mpe没有TargetControlID"属性会导致编译时错误).

Use "create appointment" as a buttonfield and give some command name.

Add modal popup extender to your page with ''TargetControlID'' assigned with dummy button with display none(because mpe without TargetControlID'' property gives compile time error).

<asp:ModalPopupExtender ID="mpe" runat="server"

 TargetControlID="btnDummy"

 PopupControlID="Panel1"

 BackgroundCssClass="modalBackground"  />


     <asp:Button ID="btnDummy" runat="server" style="display:none"/>




在行命令事件中,调用模式弹出扩展器的show方法:mpe.Show();




On row command event, call show method of modal popup extender : mpe.Show();


这篇关于在gridview中执行ajax弹出控件扩展器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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