I have an editable datagrid, to which I have added an "Add" button into the footer.
To do this I have changed the column containing the delete button from a buttonColumn to a template column
Previously a confirm delete attribute was added to the delete button in the OnItemDataBound code as follow:-
Dim deleteButton as linkButton = e.Item.Cells(4).Controls(0)
deleteButton.Attributes("onclick") = "javascript:return confirm('Are you sure you want to delete" & DataBinder.Eval(e.Item.DataItem, "Surname") & "?')"
I need to provide the same functionalty but referencing my delete button within my template column. How do I do this?
To do this I have changed the column containing the delete button from a buttonColumn to a template column
Previously a confirm delete attribute was added to the delete button in the OnItemDataBound code as follow:-
Dim deleteButton as linkButton = e.Item.Cells(4).Controls(0)
deleteButton.Attributes("onclick") = "javascript:return confirm('Are you sure you want to delete" & DataBinder.Eval(e.Item.DataItem, "Surname") & "?')"
I need to provide the same functionalty but referencing my delete button within my template column. How do I do this?