PDA

View Full Version : [CLOSED] How to pass parameters from child panel to parent panel ???



elbanna23
Jun 17, 2014, 3:21 PM
Dear All
I tried many times to pass parameters from child panel to parent panel , but till now i can't :(
can you please help me.

geoffrey.mcgill
Jun 17, 2014, 3:54 PM
If you are using a Loader, parameters could be passed in the Querystring of the Url.

elbanna23
Jun 18, 2014, 1:14 PM
can you please help me by sending me a simple code.

this is my code to create the child window



Window win4 = new Window()
{
ID = "Window4",
Width = Unit.Pixel(1150),
Height = Unit.Pixel(480),
Modal = true,
AutoRender = false,
Collapsible = true,
Maximizable = true,
Hidden = true,
Loader = new ComponentLoader
{
AutoLoad = true,
Url = "~/modules/Translation/Warranty.aspx",
Mode = LoadMode.Frame,
LoadMask = { ShowMask = true }
}
};


this.form1.Controls.Add(win4);
//---------------------------------------------------------------------
// here show window in other method
Window win = form1.FindControl("Window4") as Window;
win.Show();

Daniil
Jun 18, 2014, 2:33 PM
The Geoffrey's suggestion is to define parameter like this:

Url = "~/modules/Translation/Warranty.aspx?param1=value1&param2=value2"

elbanna23
Jun 18, 2014, 2:55 PM
sorry daniil
you don't understand me , i need to pass value from child to parent not parent to child

Daniil
Jun 18, 2014, 3:10 PM
Please clarify what do you need to pass and at which moment?

elbanna23
Jun 18, 2014, 3:40 PM
http://forums.ext.net/attachment.php?attachmentid=12811&stc=1

I need the user when select gridpanel record (in child panel) , pass value from selected record to parent panel , i already get the value but i need to pass it back to parent panel

Daniil
Jun 18, 2014, 3:53 PM
You can access a parent page from a child page in JavaScript via the "parent" reference.

elbanna23
Jun 18, 2014, 4:03 PM
I made this code :


<Listeners>
<Click Handler="parent.#{TextField68}.setValue(#{txtpackageCount}. getValue());" />
</Listeners>


but it's not work with me.
so please help me by sending this code , in javascript or handler . please :)

Daniil
Jun 18, 2014, 4:56 PM
#{} cannot work in that case.

Please try:

parent.App.TextField68.setValue(#{txtpackageCount} .getValue());

elbanna23
Jun 18, 2014, 5:04 PM
many thanks Daniil , it's works fine.
you can close thread now .