Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Image Button Not Working With DataGrid ItemCommand?

Reply
Thread Tools

Image Button Not Working With DataGrid ItemCommand?

 
 
Adam Knight
Guest
Posts: n/a
 
      02-06-2006
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


 
Reply With Quote
 
 
 
 
=?Utf-8?B?c2VyZ2UgY2FsZGVyYXJh?=
Guest
Posts: n/a
 
      02-06-2006
Hi adam

I met the same problem:
follow that post where I was submitting that issue

http://msdn.microsoft.com/newsgroups...xp=&sloc=en-us

regards
serge
"Adam Knight" wrote:

> 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
>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Buttons not working after clicking one button once =?Utf-8?B?cG11ZA==?= ASP .Net 6 09-07-2005 05:00 PM
ASP.NET client-side validation working, but button click not working Alan Silver ASP .Net 1 08-02-2005 03:50 PM
Datagrid "edit" image not working Nalaka ASP .Net 2 07-29-2005 05:49 AM
Button created with dim new button click event is not working gce ASP .Net 2 04-11-2005 07:18 PM
Select Button In Datagrid not working (VS2003/FW1.1) Richard Adams ASP .Net Datagrid Control 3 07-18-2003 09:28 PM



Advertisments