Image Button Not Working With DataGrid ItemCommand?

A

Adam Knight

Hi all,

I have a datagrid like so:

<asp:datagrid id="dgContractors"
OnItemCommand="dgContractor_ItemCommand"
Runat="server"
Width="920">

Shortened for brevity..

It contains a template collumn like so:

<asp:TemplateColumn HeaderText="Superintendent">
<ItemTemplate>
<asp:LinkButton ID="test"
CommandName="ShowSupervisorDetails"
CommandArgument='<%#
Container.DataItem("cntr_mgt_supervisor_id")%>'
Runat="server">Test </asp:LinkButton>

<asp:ImageButton
ImageUrl="images/icons/info.gif"
CommandArgument='<%#
Container.DataItem("cntr_mgt_supervisor_id")%>'
CommandName="ShowSupervisorDetails"
ID="ibtnSuperintendentInfo"
Runat="server"/>
</ItemTemplate>
<FooterTemplate></FooterTemplate>
</asp:TemplateColumn>

The LinkButton successfully fires the ItemCommand Event.

The ImageButton doesn't???

Any ideas?

Cheers,
Adam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top