-----------------------------------------------------------

New Message on cochindotnet

-----------------------------------------------------------
From: Jignesh Desai
Message 1 in Discussion



assume you have a delete button in datagrid named "btnDelete"

on ItemCreated Event Write this

 Sub DataGrid_ItemCreated(Sender As Object, e As DataGridItemEventArgs)
        Select Case e.Item.ItemType
            Case ListItemType.Item, ListItemType.AlternatingItem, ListItemType.EditItem
                Dim myDeleteButton As Button
                myDeleteButton = e.Item.FindControl("btnDelete")
                myDeleteButton.Attributes.Add("onclick",_
                        "return confirm('Are you sure you want to delete this 
company?');")

        End Select
    End Sub


Any Issue with this code write back to me...

Regards,
Jignesh Desai
http://www.dotnetjini.com 

>From: "Roshit  Rajan" <[EMAIL PROTECTED]> 
>Reply-To: "Roshit  Rajan" <[EMAIL PROTECTED]> 
>To: [EMAIL PROTECTED] 
>Subject: :Query 
>Date: 28 Sep 2004 04:59:27 -0000 
> 
>   Hi Jignesh, 
> 
>I am trying to use javascript on datagrid server control. 
>when i click on the delete push button on the datagrid,i need to get a 
>confirmation message to delete the particular row on the datagrid or just leave it 
>like that using javascipt. 
> 
>pl do help with some code. 
>thank you 
> 


-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/cochindotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to