This is a migrated thread and some comments may be shown as answers.

Call Clinetside function(javascript) in updatecommand

2 Answers 56 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kiran
Top achievements
Rank 1
kiran asked on 18 Oct 2008, 11:33 AM
hi friends

can anyone help me in calling javascript function from the update command

Protected

Sub RadGrid1_UpdateCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.UpdateCommand

javscript(function()) ?????

end sub

thanks in advance


2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 Oct 2008, 05:02 AM
Hi Kiran,

Try the following code snippet to achieve the desired scenario.

VB:
 
 
     Protected Sub RadGrid1_UpdateCommand(source As Object, e As GridCommandEventArgs) 
         Dim sb As New StringBuilder() 
         sb.Append("<script type='text/javascript'>") 
         sb.Append("Show()") 
         sb.Append("</script>") 
         ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "@@@@MyCallBackAlertScript", sb.ToString(), False) 
         
     End Sub 
 
 


JS:
 function Show() 
    { 
     alert('Hi') 
    } 


Thanks
Shinu.

0
kiran
Top achievements
Rank 1
answered on 20 Oct 2008, 09:03 AM
Hi Shinu,

Thank u very very very much for the reply.........


thanks


Tags
Grid
Asked by
kiran
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
kiran
Top achievements
Rank 1
Share this question
or