Need help with RadWindow

2 posts, 0 answers
  1. Jeff
    Jeff avatar
    9 posts
    Member since:
    Jan 2013

    Posted 21 Jan 2013 Link to this post

    Hello,

    I'm attempting to click a link Button from within my asp.net application page which is part of a master page.  Upon clicking the link, I want a radWindow to pop-up, modal.  This all works.  But when I attempt to close the radWindow, it will refresh the parent page, which causes me to lose any changes made to the screen before I popped up the dialog.

    I've followed the demo at: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

    I just can't seem to get this working.  I basically want to call the dialog, and upon exiting it, update a widget on the form that called the radWindow. 
    Question:
    1.  Should I pop up the radWindow from javascript or from code-behind? 

    Any help would be appriciecated
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 21 Jan 2013 Link to this post

    Hi,

    You can open the RadWindow  as shown below.
    C#:
    protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
     if (e.Item is GridDataItem)
     {
           HyperLink editLink = (HyperLink)e.Item.FindControl("EditLink");
           editLink.Attributes["onclick"] = String.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["EmployeeID"], e.Item.ItemIndex);
     }
    }
    JS:
    function ShowEditForm(id, rowIndex)
    {
                     window.radopen("EditFormcs.aspx?EmployeeID=" + id, "UserListDialog");
                    return false;
    }

    Thanks,
    Princy
Back to Top