I have a link button in my RadGrid. When I clicked the link button,it will pop out a new page. All is working fine without error. Here is my code:
ASP
<
telerik:RadGrid
ID
=
"gvCustomer"
runat
=
"server"
AllowPaging
=
"True"
AllowSorting
=
"True"
AutoGenerateColumns
=
"False"
CellSpacing
=
"0"
GridLines
=
"None"
Width
=
"100%"
>
<
MasterTableView
AllowMultiColumnSorting
=
"True"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to PDF"
/>
<
RowIndicatorColumn
FilterControlAltText
=
"Filter RowIndicator column"
Visible
=
"True"
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
FilterControlAltText
=
"Filter ExpandColumn column"
Visible
=
"True"
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridTemplateColumn
FilterControlAltText
=
"Filter TemplateColumn column"
HeaderText
=
"Customer Name"
SortExpression
=
"CUSTOMERNAME"
UniqueName
=
"TemplateColumn"
>
<
ItemTemplate
>
<
asp:LinkButton
ID
=
"lnkCustomerName"
runat
=
"server"
CommandArgument='<%#Eval("CUSTOMERNAME") "," +Eval("IC")+ "," +Eval("ACCNO")%>'
CommandName="command" Font-Underline="True" Text='<%# Bind("CUSTOMERNAME") %>'>
</
asp:LinkButton
>
</
ItemTemplate
>
<
FooterStyle
HorizontalAlign
=
"Center"
/>
<
HeaderStyle
Width
=
"25%"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
VerticalAlign
=
"Top"
/>
</
telerik:GridTemplateColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
FilterControlAltText
=
"Filter EditCommandColumn column"
>
</
EditColumn
>
</
EditFormSettings
>
<
PagerStyle
AlwaysVisible
=
"True"
/>
</
MasterTableView
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/>
<
PagerStyle
AlwaysVisible
=
"True"
/>
<
FilterMenu
EnableImageSprites
=
"False"
>
</
FilterMenu
>
</
telerik:RadGrid
>
VB.NET
Protected
Sub
gvCustomer_ItemCommand(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridCommandEventArgs)
Handles
gvCustomer.ItemCommand
If
e.CommandName =
"command"
Then
Dim
arg
As
String
() = e.CommandArgument.ToString.Split(
","
)
Dim
strName
As
String
= arg(1)
Dim
strIC
As
String
= arg(2)
Dim
strAccountNo
As
String
= arg(3)
Dim
str
As
String
str =
"<script language='javascript'>window.open(' "
+
"~/Customer.aspx?CustomerName="
& strName &
"&OldIC="
& strIC &
"&AccountNo="
& strAccountNo +
" ');</script>"
ClientScript.RegisterStartupScript(
Me
.
GetType
(),
"script"
, str)
End
If
End
Sub
But after I added the RadAjaxManager to handle the RadGrid. The link button is not working anymore. The new page does not pop out. But if I remove the ajax manager will work fine,the page is post back and new page is pop out. Below is the code I added:
ASP
<
telerik:RadAjaxManager
ID
=
"RadAjaxManager1"
runat
=
"server"
DefaultLoadingPanelID
=
"RadAjaxLoadingPanel1"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"gvCustomer"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"gvCustomer"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
Please help me to find out the solution.Thank you very much!