IPrxDataIsland.ReadOnly

Syntax

ReadOnly: Boolean;

Description

The ReadOnly property determines whether changed data can be saved to the source.

Comments

If this property is set to False, changed cell data can be saved into the source. If the value is True, changed data cannot be saved to the source.

The value of this property affects the Allow Data Changes checkbox in the Parameters dialog box for the data area. If the value is True, the checkbox is deselected.

Example

Executing the example requires a form with the Button1 button, a regular report with the REPORT identifier, which contains a data area. Add links to the Metabase, Report, Ui system assemblies. The example is an event handler for the Button1 button.

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    DI: IPrxDataIsland;
Begin
    MB := MetabaseClass.Active;
    MObj := MB.ItemById(
"REPORT").Bind;
    DI := (MObj 
As IPrxReport).DataIslands.Item(0);
    
// Display a message with the property value.
    If DI.ReadOnly Then
        WinApplication.InformationBox(
"Changed data cannot be saved to the data source", self As IWin32Window);    
    
Else
        WinApplication.InformationBox(
"Changed data can be saved to the source", self As IWin32Window); 
    
End If;
End Sub Button1OnClick; 

After executing the example clicking the button displays a message with information whether changed data of the first data area of the REPORT regular report can be saved to the source.

See also:

IPrxDataIsland