This is a migrated thread and some comments may be shown as answers.

Client Side Events for GridImageColumn???

1 Answer 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carl
Top achievements
Rank 1
Carl asked on 17 Mar 2010, 04:13 PM
I have two GridImageColumn(s). One for my own edit command and one for my own delete command.

How do I attach events to to the edit and delete images so I know what record I need to edit or what row I need to delete?

The OnRowClick event won't fire when a GridImageColumn is clicked.

1 Answer, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 17 Mar 2010, 10:02 PM
I don't know if you're setting the image from the database or if it's just a static image that you. 

If it's the first you could create a GridTemplateColumn, add an ImageButton control to it, assign it a CommandName (edit or delete) and bind the ImageUrl property. 

If it's the second then I would suggest that you use the GridButtonColumn, set the ButtonType="ImageButton" and set the image url.

I hope that helps.
Tags
Grid
Asked by
Carl
Top achievements
Rank 1
Answers by
robertw102
Top achievements
Rank 1
Share this question
or