IDataGrid.Selection

Fore Syntax

Selection: IDataGridSelection;

Fore.NET Syntax

Selection: Prognoz.Platform.Interop.ExtCtrlsIDataGridSelection;

Description

The Selection property returns elements selection in the component.

Fore Example

Executing this example requires a form with the Button component placed on this form and the DataGrid component. These components must have the Button1 and DataGrid1 identifiers respectively.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    i: Integer;
Begin
    i := DataGrid1.Selection.Count;
End Sub Button1OnClick;

After executing the example on clicking Button1 the "s" variable contains the number of rows selected in the DataGrid1 table.

Fore.NET Example

Executing this example requires a form with the Button component placed on this form and the DataGrid component. These components must have the Button1 and DataGrid1 identifiers respectively.

Imports System;
Imports System.Windows.Forms;
Imports Prognoz.Platform.Forms.Net;
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.ExtCtrls

    Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
    Var
        i: Integer;
    Begin
        i := DataGrid1.Selection.Count;
    End Sub;

After executing the example on clicking Button1 the "s" variable contains the number of rows selected in the DataGrid1 table.

See also:

IDataGrid