deleteFromDimSelection(report: PP.Exp.EaxDocument, metadata: Object, callback: PP.Delegate);
report. Express report, for which you need to remove elements from the selection.
metadata. metadata that contain information on removed elements.
callback. Callback function to be called to remove elements from selection.
The deleteFromDimSelection method removes elements from selection using coordinates of the express report table.
Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component), and have a loaded table that contains four or more rows:
Remove the Belgorod Area element via coordinates of the fourth row of the express report table:
// Get service for working with express report var eaxMdService = expressBox.getService(); // Get express report document var source = expressBox.getSource(); // Get express report table var eaxGridForService = expressBox.getDataView().getGridView(); // Get coordinates of express report selected area var metadata = { deleteElements: { range: { height: 0, left: 0, parts: { it: { height: 1, left: 0, top: 4, type: "Cells", width: eaxGridForService.getTabSheet().getMeasures().getMaxColumn() } }, top: 0, type: "MultiPart", width: 0 }, type: "Normal" } }; var metadataForService = new PP.Mb.Ui.PropertyChangedEventArgs({ PropertyName: PP.Exp.Ui.ControlType.DimSelection, Metadata: metadata, TypeUpdateData: [PP.Exp.Ui.ViewTypeUpdate.DimBarSelection, PP.Exp.Ui.ViewTypeUpdate.DataView] }); // Declare and initialize callback function that must be called to remove elements from selection var onDeleteFromDimSelection = function (sender, args) { expressBox.getDataView().getMapView().MetadataChanged.fire(eaxGridForService, args.Args); expressBox.getDataView().refresh(args.Args) }; // Remove element from selection via express report table coordinates eaxMdService.deleteFromDimSelection(source, metadata, PP.Delegate(onDeleteFromDimSelection, eaxGridForService, metadataForService));
After executing the example the Belgorod Area element is removed via coordinates of the fourth row of the express report table:
See also: