Reputation: 1087
I am trying to resize a dynamic dock panel to the size of the dock zone in which it's contained in javascript(client-side) at runtime. I am using the Dev Express DockZone and DockPanel. My JScript looks like this:
function setDockPanelFill() {
var dockPanel = ASPxClientControl.GetControlCollection().GetByName('dockPanel1');
var dockZone = document.getElementById('zone1');
dockPanel.SetHeight = dockZone.offsetHeight;
dockPanel.SetWidth = dockZone.offsetWidth;
}
Any ideas on why this won't work?
Upvotes: 1
Views: 2338
Reputation: 3347
Set ASPxDockZone.ClientInstanceName to e.g. dockZone1.
Set ASPxDockPanel.PanelUID to e.g. dockPanel1.
Also, SetHeight and SetWidth are methods, not properties.
So your code should look like this:
function setDockPanelFill() {
var dockPanel = dockZone1.GetPanelByUID('dockPanel1');
dockPanel.SetHeight(dockZone1.GetHeight());
dockPanel.SetWidth(dockZone1.GetWidth());
}
Upvotes: 3