Thursday, February 16, 2012  Attach Javascript with
AutoGenerated Buttons of GridView control  Shout it kick it on
This small post about how you can attach javascript confirm box
with the the autogenerated delete button of the Gridview of This
might be the old trick but this is helpful to the beginner
developer.  Consider following Aspx Grid Code <asp:GridView
ID="GridView1" runat="server" AutoGenerateDeleteButton="true"
AutoGenerateColumns="false" AutoGenerateEditButton="True"
onrowdeleting="GridView1_RowEditing"
onrowupdating="GridView1_RowUpdating"     <asp:BoundField
DataField="EMPID" HeaderText="EmployeeID" /> Now as you can see
in the above code AutoGenerateDeleteButton="true" is true that
means in grid You can see one delete button to remove record
from the grid. But the requirement is I have to ask user weather
he wants to delete record or not.  So to achieve this I made use
of the RowDataBound and the javascript function confirm which
ask user weather to delete record or not if user press yes