How to highlight a gridview row before the Delete confirmation msg is displayed by client script

A

ASMJ

Hi,

I have a gridview where I have a template field for the "Delete"
linkbutton.

I have written a client script for displaying confirmation msg before
delete as :

OnClientClick="return confirm('Are you sure you want to delete this
record?');" in the source view of the aspx page containing the
GridView.

If the user chooses to delete a row which is not selected, then he may
mistake that, the confirmation msg is for the row that is currently
selected, and not for the row that he chose to delete.

This is why I want to highlight the row as soon as the delete button is
clicked but before the confirmation msg is displayed.

I have tried trapping many events and changing the selected index, but
the highlight never occurs.. may be because the client script executes
before any of the gridview events.

Can this be done? How?

I would appreciate if anyone could help me in this

Thanks

ASMJ
 

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,989
Messages
2,570,207
Members
46,783
Latest member
RickeyDort

Latest Threads

Top