Occurs when the user has resized a column.
[Visual Basic]
Public Event ColResize As ColResizeEventHandler
[C#]
public event ColResizeEventHandler ColResize
[Delphi]
public property ColResize: ColResizeEventHandler read remove_ColResize write add_ColResize;
Remarks
If the ColResizeEventArgs.Cancel property is set to True, the previous column width is restored and no repainting occurs. To alter the degree of change, set the C1DisplayColumn.Width property of the C1DataColumn object specified by the ColResizeEventArgs.ColIndex property to the desired value.
It is not necessary to execute the C1DataColumn.Refresh method within this event procedure. Doing so causes the grid to be repainted even if the ColResizeEventArgs.Cancel property is True.
Example
The following code prevents columns resizing:
Private Sub C1TrueDBDropdown1_ColResize(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.ColResizeEventArgs) Handles C1TrueDBDropdown1.ColResize
e.Cancel = True
End Sub
· C#
private void c1TrueDBDropdown1_ColResize(object sender, C1.Win.C1TrueDBGrid.ColResizeEventArgs e)
{
e.Cancel = true;
}
· Delphi
procedure C1TrueDBDropdown1_ColResize(sender: System.Object; e: C1.Win.C1TrueDBGrid.ColResizeEventArgs);
begin
e.Cancel := True;
end;
See Also
C1TrueDBDropdown Class | C1TrueDBDropdown Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |