|
-
Nov 20th, 2002, 01:32 PM
#1
Thread Starter
Frenzied Member
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?');")
-
Nov 22nd, 2002, 11:40 PM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|