Mar 26, 2012, 4:33 PM
Accessing Child controlls contained in IFRAME from its Parent.
Am new to the Ext.NET community and I have a question. I created a ribbon style menu with a child tab panel set in IFRAME mode. The child tab contains a grid panel and I want to have a click event in the parent insert an empty row in the grid panel in the child. Is this even possible. Thank you.
I also attempted doing this from javascript by substituting "
//This piece of code is contained in the Parent (the tab panel in the parent has id 'mainTabPanel')
Cell AppendCell = new Cell();
Ext.Net.Button AppendCellBtn = new Ext.Net.Button { Text = "Append", Icon = Ext.Net.Icon.Accept, Scale = ButtonScale.Small };
AppendCellBtn.DirectClick += new ComponentDirectEvent.DirectEventHandler(AppendCellBtn_DirectClick);
AppendCell.Items.Add(AppendCellBtn);
//append row to gridpanel contained in the active child tab
void AppendCellBtn_DirectClick(object sender, DirectEventArgs e)
{
TabPanel component = (TabPanel)Ext.Net.X.GetCmp("mainTabPanel");
foreach (ContainerBase xcm in component.Items)
{
Panel childPanel = (Panel)xcm; //this always default to the first tab and not the currently active
foreach( ContainerBase contrls in childPanel.Items)
{
../// this does not work
}
}
}
I also attempted doing this from javascript by substituting "
AppendCellBtn.DirectClick " with "AppendCellBtn.Listeners.Click.Handler = "MainWnd.appendGridRow();"
. Below is the javascript function. appendGridRow: function () {
var pagePane = Ext.getCmp('componentMasterPn'); // I keep getting null value for pagePane because the childgridepane could not be found.
}
I would appreciate any help anyone could offer me. Thank you.
Last edited by Daniil; Mar 26, 2012 at 6:08 PM.
Reason: Please use [CODE] tags