[]
        
(Showing Draft Content)

GC.Spread.Sheets.Scenarios.ScenarioPanel

Class: ScenarioPanel

Sheets.Scenarios.ScenarioPanel

Table of contents

Constructors

Methods

Constructors

constructor

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);

Parameters

Name Type Description
host string | HTMLElement The host element or host element id.
workbook? Workbook The workbook associated with the scenario panel.

Methods

attach

attach(workbook): void

Attaches the scenario panel to a workbook.

example

scenarioPanel.attach(spread);

Parameters

Name Type Description
workbook Workbook The workbook to attach.

Returns

void


destroy

destroy(): void

Destroys the scenario panel.

example

scenarioPanel.destroy();

Returns

void


detach

detach(): void

Detaches the scenario panel from the current workbook.

example

scenarioPanel.detach();

Returns

void


refresh

refresh(): void

Refreshes the scenario panel view.

example

scenarioPanel.refresh();

Returns

void


findControl

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");

Parameters

Name Type Description
host string | HTMLElement The host element or the host element id.

Returns

null | ScenarioPanel

The ScenarioPanel instance.