Reputation: 11403
I try to open NavigateUrl Telerik Window from a button in a grid view which exist in an update panel
but i fail , it doesn't open the window at all
<asp:TemplateField HeaderText="details" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:ImageButton ID="ibtn_details" runat="server" ImageUrl="~/images/details.png"
CommandArgument='<%#((GridViewRow)Container).RowIndex%>' CommandName="Get_details" />
</ItemTemplate>
</asp:TemplateField>
<telerik:RadWindow runat="server" ID="radwin_popupdetails" NavigateUrl="PopUpDetail.aspx"
Modal="true" InitialBehaviors="Maximize">
</telerik:RadWindow>
<script type="text/javascript">
function openWinNavigateUrl() {
$find("<%=radwin_popupdetails.ClientID %>").show();
}
</script>
protected void gv_inbox_RowCommand(object sender, GridViewCommandEventArgs e)
{
int index = Convert.ToInt32(e.CommandArgument);
if (e.CommandName == "Get_details")
{
Session["main_code"] = int.Parse(((HiddenField)gv_inbox.Rows[index].Cells[1].FindControl("HDN_MainCode")).Value);
//System.Web.UI.ScriptManager.RegisterClientScriptBlock(UpdatePanel2, UpdatePanel2.GetType(), "Open window", "openWinNavigateUrl(); return false;", true);
RadScriptManager.RegisterStartupScript(this, this.GetType(), "tabSelectedScript", "openWinNavigateUrl();", true);
}
}
Upvotes: 0
Views: 334
Reputation: 5601
Take a look at the following resources, they will help you either do it this way, or even improve:
http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx
Upvotes: 2