Hi
I am using telrik radopen function to open the popups. I have a situation in which child popup opens from parent popup which opens from grandparent .aspx page.
Grandparent (.aspx page) -> popup (parent) -> popup(child)
I want to close the parent popup and child popup on click of a button on child popup. I tried using
GetRadWindow().BrowserWindow.BrowserWindow.Close() // this one and variations of this errored !
GetRadWindow().BrowserWindow.close(); // this did not errored but didn't close parent window
GetRadWindow().Close(); // this closes only child window - when invoked from button click on child window
I read the question Is it possible to close parent window from child (Javascript)?
If in case it is not possible to close the parent popup from child popup is there a workaround so that I can simulate the behavior of 'submit button click' on child control can close child and parent popup and refresh the grid on the grandparent .aspx page?
May be redirect can help. In that case how do I do that?
Any suggestions.
Thanks
Kuldip
<
telerik:RadToolTip
ID
=
"UserEdit"
runat
=
"server"
Skin
=
"Office2010Black"
ManualClose
=
"True"
Position
=
"Center"
RelativeTo
=
"BrowserWindow"
ShowCallout
=
"False"
Modal
=
"True"
>
Hello!
</
telerik:RadToolTip
>
public
void
grdSiteFunding_NeedDataSource(
object
sender, GridNeedDataSourceEventArgs e)
{
SiteFundingCalculation sfc =
new
SiteFundingCalculation(2010);
if
(TotAmnt <= 0)
{
TotAmnt = sfc.CalculateNetFunds();
TotLeft = TotAmnt;
}
if
(TotLeft <= 0)
{
TotLeft = TotAmnt;
}
//Bind the grid to the child class.
grdSiteFunding.DataSource = sfc.FundingDetails.ToList();
}
protected decimal TotAmnt = 0;
protected decimal TotLeft = 0;
public
void
grdSiteFunding_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridDataItem)
{
GridDataItem dItem = (GridDataItem)e.Item;
decimal
oFunds = 0;
decimal
cFunds = 0;
oFunds =
decimal
.Parse(dItem[
"OverriddenFunding"
].Text.Replace(
"$"
,
""
).Trim());
cFunds =
decimal
.Parse(dItem[
"CalculatedFunding"
].Text.Replace(
"$"
,
""
).Trim());
decimal
retVal = 0;
if
(oFunds > 0)
{
if
(oFunds <= TotLeft)
{
retVal = TotLeft - oFunds;
TotLeft -= oFunds;
}
else
{
retVal = TotLeft;
if
(TotLeft != 0)
TotLeft -= TotLeft;
}
}
else
if
(TotLeft >= cFunds)
{
if
(cFunds <= TotLeft)
{
retVal = TotLeft - cFunds;
TotLeft -= cFunds;
}
else
{
retVal = TotLeft;
if
(TotLeft != 0)
TotLeft -= TotLeft;
}
}
else
{
retVal = TotLeft;
if
(TotLeft != 0)
TotLeft -= TotLeft;
}
dItem[
"RemainingFunds"
].Text = retVal.ToString(
"C"
);
}
}
function requestStart(sender, args) {
if (args.get_eventTarget().indexOf("lnkExportExcel") >= 0)
args.set_enableAjax(false);
}
protected override void CreateChildControls()
{
RadTreeView treeview = new RadTreeView() { ID = "RadTreeView", Width = new System.Web.UI.WebControls.Unit(285),
Height = new System.Web.UI.WebControls.Unit(290),
CheckBoxes = true
};
treeview.Nodes.Add(new RadTreeNode("Test"));
Controls.Add(treeview);
base.CreateChildControls();
}
function pageLoad() {
checkMain();
}
function checkMain() {
var tree = $find("<%= RadTreeView1.ClientID %>");
alert(tree);
}
<
div
style
=
"overflow:auto;height:290px;width:285px;"
class
=
"RadTreeView RadTreeView_Default"
id
=
"ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView"
>
<
ul
class
=
"rtUL rtLines"
>
<
li
class
=
"rtLI rtFirst rtLast"
><
div
class
=
"rtTop"
>
<
span
class
=
"rtSp"
></
span
><
input
type
=
"checkbox"
class
=
"rtChk"
><
span
class
=
"rtIn"
>Test</
span
>
</
div
></
li
>
</
ul
><
input
type
=
"hidden"
name
=
"ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView_ClientState"
id
=
"ctl00_m_g_105ccf0c_7bb3_4553_b184_03f24f749c13_RadTreeView_ClientState"
autocomplete
=
"off"
value
=
"{"expandedNodes":[],"collapsedNodes":[],"logEntries":[],"selectedNodes":[],"checkedNodes":[],"scrollPosition":0}"
>
</
div
>