Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The Delete Column in a Datagrid

Status
Not open for further replies.

barrylowe

Programmer
Joined
Nov 6, 2001
Messages
188
Location
GB
I have a datagrid which which display a list of records. In it I have a delete column which will quite happily allow the user to delete a selected row.

My problem is that I want to prompt the user before the deletion takes place. you know, the standard "Are you sure you want to delete?" message.

Can anyone tell me how to do this?
 
You'll have to add a javascript function to the button e.g.
Code:
onclick="return confirm('Are you sure you want to delete?');"


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
I don't have a button. All I have is a ButtonColumn in the datagrid and as far as I can tell it does not have an onclick event.
 
You have two options as far as I can remember:

1) Set the ButtonType property to PushButton to render a button instead
2) Use a TemplateColumn instead and add a button in it

See these articles for more info:



____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top