ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

C1TrueDBGrid.RowResize Event

Occrus whenever the user resizes a row.

[Visual Basic]

Public Event RowResize As CancelEventHandler

[C#]

public event CancelEventHandler RowResize

[Delphi]

public property RowResize: CancelEventHandler read remove_RowResize write add_RowResize;

Remarks

If the CancelEventArgs.Cancel property is set to True, the previous row height is restored and no repainting occurs. To alter the degree of change, set the RowHeight property to the desired value.

It is not necessary to execute the Refresh method within this event procedure. Doing so causes the grid to be repainted even if the CancelEventArgs.Cancel property is True.

Example

To keep row resizing from occurring in the grid at run time, use the following code:

·      Visual Basic

       Private Sub C1TrueDBGrid1_RowResize(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.CancelEventArgs) Handles C1TrueDBGrid1.RowResize

           e.Cancel = True

       End Sub

·      C#

       private void c1TrueDBGrid1_RowResize(object sender, C1.Win.C1TrueDBGrid.CancelEventArgs e)

       {

           e.Cancel = true;

       }

·      Delphi

       procedure C1TrueDBGrid1_RowResize(sender: System.Object; e: C1.Win.C1TrueDBGrid.CancelEventArgs);

       begin

         e.Cancel := True;

       end;

See Also

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


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