getModeSelectorView ();
The getModeSelectorView method returns the component that manages workbook views layout.
To execute the example, the page must contain the WbkDataBox component named wbkDataBox (see WbkDataBox Constructor), several data views must be open in the working area, and the following code must be added in the document opening event handler:
var setVerticalButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Set Vertically", //text Click: PP.Delegate(onClickSetVertical) }); function onClickSetVertical(){ //Get component used to control workbook view positions var modeSelector = wbkDataBox.getModeSelectorView(); //Get metadata of selected mode change var pos = modeSelector.getModeSelectorState(PP.TS.Ui.ModeSelectorType.Horizontal); //Get workbook metadata var md = wbk.getMetadata(); //Set metadata of selected mode change to workbook metadata for (var prop in pos){ md[prop] = pos[prop]; } //Refresh wbkDataBox.refreshAll(); }
After executing the example the Set Vertically button is placed in the page. Clicking this button changes data layout to vertical.
See also: