在 DevExpress gridView 中使用数据绑定事件查找 ImageControl
我根据某些标准在 ASPX GridView 中显示图像。我无法从服务器端找到 Imagebutton 控件。我正在使用 DataBound 事件来捕获 Imagebutton 的值。
请查看代码片段。
ASPX:
<dxwgv:GridViewDataTextColumn Caption="Active" FieldName="Active" Name="Active" >
<DataItemTemplate>
<asp:ImageButton ID="imgBell" runat="server" ImageUrl='<%#GetImageName(Eval("Active"))%>' />
</DataItemTemplate>
</dxwgv:GridViewDataTextColumn>
Code behind:
Protected Sub gvAlertReport_DataBound(ByVal sender As Object, ByVal e As EventArgs) Handles gvAlertReport.DataBound
'Here I need to find control of Image button "imgBell"
End Sub
提前致谢..
I am displaying a image in ASPX GridView based on some criteria. I am unable to find the Imagebutton control from server side. I am using DataBound event to capture the value of Imagebutton.
Please look at the code snippet.
ASPX:
<dxwgv:GridViewDataTextColumn Caption="Active" FieldName="Active" Name="Active" >
<DataItemTemplate>
<asp:ImageButton ID="imgBell" runat="server" ImageUrl='<%#GetImageName(Eval("Active"))%>' />
</DataItemTemplate>
</dxwgv:GridViewDataTextColumn>
Code behind:
Protected Sub gvAlertReport_DataBound(ByVal sender As Object, ByVal e As EventArgs) Handles gvAlertReport.DataBound
'Here I need to find control of Image button "imgBell"
End Sub
Thanks in advance..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里回答了您的问题:
Find ASPX GridView Image control from服务器端
I've answered this your question here:
Find ASPX GridView Image control from Server side