Results 1 to 2 of 2

Thread: another click twice question!

  1. #1

    Thread Starter
    Frenzied Member EyeTalion's Avatar
    Join Date
    Jul 2000
    Location
    New York
    Posts
    1,075

    another click twice question!

    I'm using this code to pop-up a message box. The problem is that it doesn't work on the first click, it has to be clicked twice and thats for each row in the datagrid. Then it is fine. Any suggestions?


    Dim btnDelete As Button
    btnDelete = e.Item.Cells(4).Controls(0) '<---2nd column, first control
    btnDelete.Attributes.Add("onclick", "return confirm('Are you Sure you want to delete this row?');")

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367
    Where do you bind the data to the datagrid??? I have found that most problems with the datagrid are based on where you bind the data, maybe this will clear it up.

    User Clicks a button on your page:
    PostBack to the Server
    Call your PageLoadFunction
    Call your EventHandler


    If you bind the data in your pageload function then it will take 2 trips for your effect in your event handler to appear. If you bind in the event handler then you will see the effect on the first load of the page.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width