---------------------------------------------------------------
1.
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
TableCell cell = GridView1.Rows[e.RowIndex].Cells[2];
if (cell.Text == "Chai")
{
e.Cancel = true;
// lblmsg.Text = "You cannot delete : Chai";
ClientScript.RegisterStartupScript(GetType(), "Message", "<SCRIPT LANGUAGE='javascript'>alert('You cannot delete this product.');</script>");
}
else
{
Response.Write(" Product Deleted"); // write here the code to delete the product.
}
}
###########################################
Saturday, November 27, 2010
RowDeleting(1)
Saturday, November 27, 2010 Posted by Vikas SharmaLabels: Row_Deleting
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment