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

Need help with RadWindow

1 Answer 25 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 21 Jan 2013, 02:18 PM
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

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 22 Jan 2013, 04:53 AM
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
Tags
General Discussions
Asked by
Jeff
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or