Selection: IDataGridSelection;
Selection: Prognoz.Platform.Interop.ExtCtrlsIDataGridSelection;
The Selection property returns elements selection in the component.
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.
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: