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

Discussion in 'ASP .Net Web Controls' started by ASMJ, Oct 4, 2006.

  1. ASMJ

    ASMJ Guest

    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
     
    ASMJ, Oct 4, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JenHu
    Replies:
    6
    Views:
    5,262
    =?Utf-8?B?UGF1bCBK?=
    Feb 3, 2005
  2. Fernando Lopes
    Replies:
    0
    Views:
    3,213
    Fernando Lopes
    Apr 28, 2005
  3. ASMJ
    Replies:
    0
    Views:
    412
  4. akila_natarajan

    Read .msg attachment from a mail(.msg)

    akila_natarajan, May 13, 2011, in forum: Java
    Replies:
    0
    Views:
    428
    akila_natarajan
    May 13, 2011
  5. Charles Lowe
    Replies:
    0
    Views:
    258
    Charles Lowe
    May 13, 2007
Loading...

Share This Page