calvin Posted December 7, 2004 Posted December 7, 2004 Hi, I want to popup a dialog box to the user before delete the row in datagrid. I get some code from the internet, it was using "template column" to do the delete command. However, I was using "button column" instead of the previous one. This is the code get from Internet: Public Sub DataGrid1_ItemDataBound(ByVal s As Object, ByVal e As DataGridItemEventArgs) Dim l As LinkButton If e.Item.ItemType = ListItemType.EditItem Or e.Item.ItemType = ListItemType.AlternatingItem Then l = CType(e.Item.Cells(1).FindControl("btnDelete"), LinkButton) l.Attributes.Add("onclick", "return confirm('Are you sure you want to delete this item?');") End Sub My Problem is: In my "Delete" button column, the link button text has been replaced by image path. So, how can I get control to the link button? :confused: Thank for any help and suggestion. :) Calvin Quote
Diesel Posted December 16, 2004 Posted December 16, 2004 I don't see what the problem is. Is it that your using an ImageButton instead of a Link Button? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.