Please examine the code provided, it achieves what you want.
private void TrunkGroup_ItemCreated(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType ==
ListItemType.AlternatingItem)
{
LinkButton deleteButton = ((LinkButton)e.Item.Cells[0].Controls[0]);
deleteButton.Attributes.Add("onClick", "event.returnValue=confirm('Are you
sure you wish to delete this item?');");
}
}
--
Regards,
Alvin Bruney
Got tidbits? Get it here...
http://tinyurl.com/2bz4t
"Ridhi" <> wrote in message
news:01d601c3d175$08ba45f0$...
> I have a datagrid wherein each row has a check box. the
> user has to select the rows which he wants to delte. After
> doing that and click "Delete" the user shpuld be prompted
> for "Delete yes? or no?" id yes is clicked go ahead and
> delete..or if no"Cancle the operation".Can anybody tell me
> how to do this.
>
> thanks in advance