Client Side Events for GridImageColumn???

2 posts, 0 answers
  1. Carl
    Carl avatar
    16 posts
    Member since:
    Mar 2009

    Posted 17 Mar 2010 Link to this post

    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.

  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 17 Mar 2010 Link to this post

    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.
Back to Top