Show contents 

Express > Express Assembly Interfaces > IEaxGrid > IEaxGrid.CreateAttachmentsPluginContext

IEaxGrid.CreateAttachmentsPluginContext

Syntax

CreateAttachmentsPluginContext(Row: Integer; Column: Integer): IEaxAttachmentsPluginContext;

Parameters

Row. The cells index in row.

Column. Column cell index.

Description

The CreateAttachmentsPluginContext method creates a context for working with cell attachments.

Comments

The obtained context is specified as a value of the IUiCommandExecutionContext.Data property on working with the ShowAttachmentsDialog command.

Example

Executing the example requires that the repository contains an express report with the EXPRESS_REPORT identifier. The data source for the express report is set up to work with attachments.

Add links to the Express, Metabase, Ui system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Eax: IEaxAnalyzer;
    Target: IUiCommandTarget;
    Context: IUiCommandExecutionContext;
    EaxContext: IEaxAttachmentsPluginContext;
    Grid: IEaxGrid;
Begin
    MB := MetabaseClass.Active;
    Eax := MB.ItemById("EXPRESS_REPORT").Edit As IEaxAnalyzer;
    Target := WinApplication.Instance.GetPluginTarget("Report");
    Context := Target.CreateExecutionContext;
    Grid := Eax.Grid;
    EaxContext := Eax.Grid.CreateAttachmentsPluginContext(55);
    Context.Data := EaxContext;
    Target.Execute("ShowAttachmentsDialog", Context);
    (Eax As IMetabaseObject).Save;
End Sub UserProc;

On executing the example, a dialog box for working with attachments opens for the specified cell. After finishing the work with attachments, the express report is saved.

See also:

IEaxGrid