Assuming your DataGrid was named Descriptions, add an onItemDataBound event handler and include the following. This assumes the submit button for the DELETE command is the sixth control within a row. If not, just change the 5 below to the appropriate number:
Descriptions.Controls.Add(New LiteralControl("<SCRIPT FOR=""" & e.Item.Controls(5).ClientID.ToString() & """ EVENT=""onclick"" Language=""JavaScript"">if(!confirm('Are you sure?')){return false; window.event.cancelBubble=true;}</SCRIPT>" & vbCrLf))




Reply With Quote