AjaxToolKit的GridView HyperLinkField和PopupControlExtender [英] GridView HyperLinkField and PopupControlExtender of AjaxToolKit

查看:66
本文介绍了AjaxToolKit的GridView HyperLinkField和PopupControlExtender的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有人午后都好,
我有一个GridView和一个Tabpanel,如下所示.

Good After Noon to all,
i have one GridView and one Tabpanel which is given below.

  <asp:TabPanel ID="Panel1" HeaderText="Overviw" runat="server">
  

 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
           DataKeyNames="ItemID" DataSourceID="ItemGrid" AllowPaging="True">
    <columns>           
 <asp:BoundField DataField="ItemID" HeaderText="ItemID" ReadOnly="True"  SortExpression="ItemID" />
<asp:HyperLinkField  DataNavigateUrlFields="ItemID"  DataNavigateUrlFormatString="order.aspx?ItemID={0}" DataTextField="ItemDescription" HeaderText="ItemDescription" SortExpression="ItemDescription"  >  

 <asp:BoundField DataField="Remarks" HeaderText="Remarks" SortExpression="Remarks" /></columns>


我需要在单击HyperlinkField时将其对应的记录ItemID传递给TabPanel(panel1),并且在单击HyperLinkField时打开选项卡面板.

我正在使用PopopControlExtender,但其TargetControlID仅接受控件ID,但在HyperlinkField中却没有ID,所以我该怎么做.....


i need when i Click the HyperlinkField then its pass the Corresponding Record ItemID to TabPanel (panel1) and tab panel open on clicking of HyperLinkField.

i am using PopopControlExtender But its TargetControlID Accept Only Control ID but in HyperlinkField Does not have ID so how i do this please help me .....

推荐答案

Event可用于超链接字段的ID,那么它的用途是什么.对于每个超链接,您将打开相同的弹出窗口,并且弹出控件将仅保存一组数据.因此,请使用不同的控件is equal to再次打开同一弹出窗口,并通过一个控件将其打开.

如果要单独的弹出窗口,则需要将面板,弹出窗口扩展程序和超链接按钮打包到Item模板中.进行进一步的操作没什么复杂.
Eventhough an id available for the hyperlink field then what is the use of it. For each hyperlink you will be open the same popup and the popup controls will hold only one set of data. So open the same pop up again using different controls is equal to open it by one control.

If you want separate popup then you need to have the panel, popup extender, a hyperlink button all packed into a Item template. Goes little complex for further operations.


这篇关于AjaxToolKit的GridView HyperLinkField和PopupControlExtender的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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