E
Elton W
Hi Peter,
You use
DeleteButton.Attributes.Add("onclick", "return confirm
('Are you sure you want to delete?');");
in datagrid_ItemDataBound event to add confirmation for
delete button.
HTH
Elton Wang
(e-mail address removed)
the delete function plus am using java script on the
client side(HTMT) but dont really know how to make the pop
up work when the delete button is cliked..here is a html
code..Anyhelp would be really appreciated.thanks
104px"
AutoGenerateColumns="False" CellPadding="1"OnDeleteCommand="dg_Delete" Height="216px" Font-
Size="X-Small" OnEditCommand="dg_Edit"
OnUpdateCommand="dg_Update"onCancelCommand="dg_Cancel" Font-Names="Arial"
Width="712px" DataKeyField="Booking_ID">
UpdateText="Update" CancelText="Cancel"
<asp:RequiredFieldValidator ID="rfvStatus"
Display="Dynamic" ErrorMessage="Status is required!"
Controltovalidate="TxtStatus"
You use
DeleteButton.Attributes.Add("onclick", "return confirm
('Are you sure you want to delete?');");
in datagrid_ItemDataBound event to add confirmation for
delete button.
HTH
Elton Wang
(e-mail address removed)
problem with it..i am using data grid with push button for-----Original Message-----
(Type your message here)
the delete function plus am using java script on the
client side(HTMT) but dont really know how to make the pop
up work when the delete button is cliked..here is a html
code..Anyhelp would be really appreciated.thanks
Studio .NET 7.1" name="GENERATOR"><HTML>
<HEAD>
<title>ViewBooking</title>
<meta content="Microsoft Visual
style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP:<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<script language="javascript">
function confirm_delete()
{
if (confirm("Are you sure you want to delete this item?")==true)
return true;
else
return false;
}
</script>
</HEAD>
<body bgColor="#ffffff" MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:datagrid id="ViewBookingGrid"
104px"
BorderColor="Gray" Runat="Server"BorderStyle="Solid"
AutoGenerateColumns="False" CellPadding="1"OnDeleteCommand="dg_Delete" Height="216px" Font-
Size="X-Small" OnEditCommand="dg_Edit"
OnUpdateCommand="dg_Update"onCancelCommand="dg_Cancel" Font-Names="Arial"
Width="712px" DataKeyField="Booking_ID">
<AlternatingItemStyle Font-
Names="Arial" BackColor="#CCCCCC"> said:<ItemStyle
Size="10pt" Font-Names="Arial" Font-Bold="True"ForeColor="Black"> said:<HeaderStyle Font-
<asp:EditCommandColumn ButtonType="PushButton"ForeColor="White" BackColor="#A2C1FF"> said:<Columns>
UpdateText="Update" CancelText="Cancel"
DataField="Cust_Email" ReadOnly="True"EditText="Edit"> said:<asp:BoundColumn
DataField="Booking_Date" ReadOnly="True"HeaderText="Customer Email"> said:<asp:BoundColumn
DataField="Booking_Time" ReadOnly="True"HeaderText="Booking Date"> said:<asp:BoundColumn
DataField="Service_Type" ReadOnly="True"HeaderText="Booking Time"> said:<asp:BoundColumn
DataField="Reported_fault" ReadOnly="True"HeaderText="Service Type"> said:<asp:BoundColumn
DataField="Model_Name" ReadOnly="True" HeaderText="ModelHeaderText="Reported Fault"> said:<asp:BoundColumn
DataField="Model_No" ReadOnly="True" HeaderText="ModelName"> said:<asp:BoundColumn
DataField="Sales_ID" ReadOnly="True" HeaderText="ReceiptNo"> said:<asp:BoundColumn
<asp:TextBox Id ="TxtStatus" Runat ="server" TexTNo"> said:#Container.DataItem("Status")%>
<asp:RequiredFieldValidator ID="rfvStatus"
Display="Dynamic" ErrorMessage="Status is required!"
Controltovalidate="TxtStatus"
Runat="server" />
Text="Delete" ButtonType="PushButton"<asp:ButtonColumn