Imagebutton as commandbutton

R

RH

Hi,
I want to use an imagebutton as commandbutton in a datagrid. When I
add a column, say "delete", convert it to a template column and
replace the linkbutton with an imagebutton, the button will not work.
What am I doing wrong?

TIA
Remco
 
T

Teemu Keiski

And you specify the name of the action into CommandName property of the
ImageButton, for example Delete so that DeleteCommand will be called for the
grid? Valid names for these commands are specified in

CancelCommandName
DeleteCommandName
EditCommandName
NextPageCommandArgument
PageCommandName
PrevPageCommandArgument
SelectCommandName
SortCommandName .
UpdateCommandName

properties of Datagrid. By default they are "Update", "Delete","Sort" and so
on. These DataGrid uses to detect which command it is in question and again
should it raise specific event to cause some action or just raise
ItemCommand event (which is raised in any case).
 
R

RH

Thanks for your reply!
Yes, I do specify the commandname as Delete. However, the thing
doesn't work. When I use the standard hyperlinkbutton, you can see in
the statusbar a link to javascript when you hover the button. This
does not happen when I hover the image button. It DOES generate a
postback, but it seems to generate no event.
 

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,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top