如何为命令字段添加postbacktrigger [英] How to add the postbacktrigger for the commandfield

查看:204
本文介绍了如何为命令字段添加postbacktrigger的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在我的应用程序中,我正在使用gridview的更新面板.在那个gridview中,我使用了一个Commandfield控件.单击命令字段按钮时,我为此gridview selectedindexchangge做一些动作.现在我的问题是我想为该命令字段添加postbacktrigger.如果可能,如何在代码级别添加postbacktrigger.这是代码:

Hi,

In my application I am using the update panel for the gridview. In that gridview I am using one commandfield control. I am doing some action for this gridview selectedindexchangge when the commandfield button is clicked. Now my problem is I want to add the postbacktrigger for that commandfield is that possible. If possible, how to add the postbacktrigger in code level. Here is the code:

<asp:CommandField  ButtonType="Button" HeaderText="View" SelectText="View"
                                            ShowSelectButton="True" />



预先感谢



Thanks in advance

推荐答案

您可以将gridview添加为回发触发控件,事件将为"Select",因为这是您对gridview的命令.
You can add the gridview as postback trigger control, the event would be "Select" because that is your command for the gridview.


这篇关于如何为命令字段添加postbacktrigger的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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