ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.SelRange Property

Gets a value indicating whether a range of cells has been selected.

[Visual Basic]

Public ReadOnly Property SelRange As Boolean

[C#]

public bool SelRange {get;}

[Delphi]

public property SelRange: Boolean read get_SelRange;

Remarks

This property returns True if the user has selected a range of cells (both rows and columns), False otherwise.

Example

The following code shows a message box displaying the total number of rows selected in a grid:

·      Visual Basic

       Dim TotalRows As Integer

       TotalRows = Me.C1TrueDBGrid1.SelectedRows.Count

       If Me.C1TrueDBGrid1.SelRange = True Then

           MsgBox(TotalRows & " rows have been selected.")

       End If

·      C#

       int TotalRows;

       TotalRows = this.c1TrueDBGrid1.SelectedRows.Count;

       if (this.c1TrueDBGrid1.SelRange == true)

       {

           MessageBox.Show(TotalRows + " rows have been selected.");

       }

·      Delphi

       var

         TotalRows : Integer;

       begin

         TotalRows := Self.C1TrueDBGrid1.SelectedRows.Count;

         if (Self.C1TrueDBGrid1.SelRange = True) then

           MsgBox(TotalRows + ' rows have been selected.');

       end;

See Also

C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.