[]
Sheets.Scenarios.ScenarioPanel
• new ScenarioPanel(host, workbook?)
Represents a scenario panel that displays and manages workbook scenarios.
example
var spread = new GC.Spread.Sheets.Workbook(document.getElementById("ss"));
var scenarioPanel = new GC.Spread.Sheets.Scenarios.ScenarioPanel(document.getElementById("scenarioPanel"), spread);
| Name | Type | Description |
|---|---|---|
host |
string | HTMLElement |
The host element or host element id. |
workbook? |
Workbook |
The workbook associated with the scenario panel. |
▸ attach(workbook): void
Attaches the scenario panel to a workbook.
example
scenarioPanel.attach(spread);
| Name | Type | Description |
|---|---|---|
workbook |
Workbook |
The workbook to attach. |
void
▸ destroy(): void
Destroys the scenario panel.
example
scenarioPanel.destroy();
void
▸ detach(): void
Detaches the scenario panel from the current workbook.
example
scenarioPanel.detach();
void
▸ refresh(): void
Refreshes the scenario panel view.
example
scenarioPanel.refresh();
void
▸ Static findControl(host): null | ScenarioPanel
Gets the ScenarioPanel instance by the host element.
example
var scenarioPanel = new GC.Spread.Sheets.Scenarios.ScenarioPanel(document.getElementById("scenarioPanel"), spread);
var scenarioPanelInstance = GC.Spread.Sheets.Scenarios.ScenarioPanel.findControl("scenarioPanel");
| Name | Type | Description |
|---|---|---|
host |
string | HTMLElement |
The host element or the host element id. |
null | ScenarioPanel
The ScenarioPanel instance.