473,322 Members | 1,690 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Image Button Not Working With DataGrid ItemCommand?

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
Feb 6 '06 #1
1 2421
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

Feb 6 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Child | last post by:
I have a datagrid on which i would like a button column and pagination in the asp:datagrid tag i have the following code: onpageindexchanged="page_change" onitemcommand="gridact_itemcommand" ...
2
by: Bart Schelkens | last post by:
Sorry but I have another question about a button in a datagrid. I have the following button in my datagrid : asp:TemplateColumn HeaderText=""> <HeaderStyle width="20px"></HeaderStyle>...
6
by: WebMatrix | last post by:
Hello, Here's the situation (I'll try to be brief as possible) I am working on the control which is created dynamically based on XML string. This control consists of a table with number of rows...
2
by: sri_san | last post by:
Hello group, I have a datagrid(dg) and a couple of buttons outside the dg( 'New'& 'Done'). Have a 'save' button inside the dg that responds to itemcommand event. On a 'New' button click, the...
1
by: Stu | last post by:
Hi, I have a button in the footer of a datagrid that sometimes does not tigger the item command. The page is quite large & has a number of homegrown controls in it. Has anyone come across this...
1
by: John Hughes | last post by:
Im adding a button at runtime to a datagrid but the DataGrid1.ItemCommand event does not fire. I also have a button that I added at design time and this button does fire the event ItemCommand. ...
5
by: Jeff User | last post by:
Hello ..NET 1.1, VS 2003, C# & asp.net I have tried to follow msdn instructions and samples but I can not get an event to fire for this button on the datagrid. There has to be something obvious...
1
by: orangedesk | last post by:
Please let me know what all options can I try to make the itemcommand get called when a image button gets clicked? I tried some of the options like checking the autopost back before binding the...
1
by: ashima515 | last post by:
Hi I have made a datagrid with first column as hyperlink col and last as button col and all cols inbetween are bound cols. the hyperlink col contains the empid n when an enpid is clicked a form...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.