Here's what I did. Please help:
1. created a RadGrid with OnItemCommand="RadGrid1_ItemCommand; and created a image button.
<telerik:GridTemplateColumn AllowFiltering="false">
<ItemTemplate>
<asp:ImageButton ID="imgbtnEdit" ToolTip="Edit Solution" CommandName="modify"
CommandArgument='<%# Bind("solution_id") %>' runat="server" ImageUrl="~/Images/edit.gif" />
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" Width="2%"></ItemStyle>
<ItemStyle BorderStyle="Solid" HorizontalAlign="Left" VerticalAlign="Top" Width="1%" />
2.created .js file with following code
function EditSolution(SolutionID)
{
var newWindow;
var WindowName;
WindowName = strSessionID + "EditSolution" + SolutionID;
newWindow = window.open(
strPublicMap + "/" + strDispLangCode + "/solutions/processsolution.asp?command=edit&solutionID=" + SolutionID,
WindowName,
"toolbar=yes,channelmode=no,menubar=yes,location=yes,directories=no,scrollbars=yes,resizable=yes,status=yes,height=470,width=750,left=1,top=1");
}
3. reference in .aspx file
<head id="Head1" runat="server">
<title></title>
<script language ="javascript" type="text/javascript" src ="../Script/Home.js"></script>
</head>
4. in code behind file
Protected Sub RadGrid1_ItemCommand(ByVal source As Object, ByVal e As GridCommandEventArgs) Handles RadGrid1.ItemCommand
Dim strCommandName As String = e.CommandName.ToLower()
Dim sTitle As String = ""
Dim intIndex As Integer
If (strCommandName = "browse" Or strCommandName = "modify" Or strCommandName = "attachment") Then
intIndex = Convert.ToInt32(e.CommandArgument)
Select Case strCommandName
Case "modify"
EditSolution(intIndex)
Case "attachment"
End Select
End If
Protected Sub EditSolution(ByVal iSolutionID As Integer)
Dim strScript As String = String.Empty
strScript = "javascript:EditSolution(" & iSolutionID & ");"
ScriptManager.RegisterStartupScript(Me.RadGrid1, Me.GetType, "OpenAttachments", strScript, True)
End Sub
The js file should be fine since it is used by production. I just start to use telerik grid. I believe last line code is wrong, but not sure how to fix it. ScriptManager.RegisterStartupScript(Me.RadGrid1, Me.GetType, "OpenAttachments", strScript, True)
Thanks in advance!