Editare

Partajați prin


DataGridViewRowDividerDoubleClickEventArgs Class

Definition

Provides data for the RowDividerDoubleClick event of a DataGridView.

public ref class DataGridViewRowDividerDoubleClickEventArgs : System::Windows::Forms::HandledMouseEventArgs
public class DataGridViewRowDividerDoubleClickEventArgs : System.Windows.Forms.HandledMouseEventArgs
type DataGridViewRowDividerDoubleClickEventArgs = class
    inherit HandledMouseEventArgs
Public Class DataGridViewRowDividerDoubleClickEventArgs
Inherits HandledMouseEventArgs
Inheritance
DataGridViewRowDividerDoubleClickEventArgs

Examples

The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the RowDividerDoubleClick event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing Show with Console.WriteLine or appending the message to a multiline TextBox.

To run the example code, paste it into a project that contains an instance of type DataGridView named DataGridView1. Then ensure that the event handler is associated with the RowDividerDoubleClick event.

private void DataGridView1_RowDividerDoubleClick(Object sender, DataGridViewRowDividerDoubleClickEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "RowIndex", e.RowIndex );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Handled", e.Handled );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Button", e.Button );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Clicks", e.Clicks );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "X", e.X );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Y", e.Y );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Delta", e.Delta );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Location", e.Location );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "RowDividerDoubleClick Event" );
}
Private Sub DataGridView1_RowDividerDoubleClick(sender as Object, e as DataGridViewRowDividerDoubleClickEventArgs) _ 
     Handles DataGridView1.RowDividerDoubleClick

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "RowIndex", e.RowIndex)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Handled", e.Handled)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Button", e.Button)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Clicks", e.Clicks)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "X", e.X)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Y", e.Y)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Delta", e.Delta)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Location", e.Location)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"RowDividerDoubleClick Event")

End Sub

Remarks

For more information about how to handle events, see Handling and Raising Events.

Constructors

DataGridViewRowDividerDoubleClickEventArgs(Int32, HandledMouseEventArgs)

Initializes a new instance of the DataGridViewRowDividerDoubleClickEventArgs class.

Properties

Button

Gets which mouse button was pressed.

(Inherited from MouseEventArgs)
Clicks

Gets the number of times the mouse button was pressed and released.

(Inherited from MouseEventArgs)
Delta

Gets a signed count of the number of detents the mouse wheel has rotated, multiplied by the WHEEL_DELTA constant. A detent is one notch of the mouse wheel.

(Inherited from MouseEventArgs)
Handled

Gets or sets whether this event should be forwarded to the control's parent container.

(Inherited from HandledMouseEventArgs)
Location

Gets the location of the mouse during the generating mouse event.

(Inherited from MouseEventArgs)
RowIndex

The index of the row above the row divider that was double-clicked.

X

Gets the x-coordinate of the mouse during the generating mouse event.

(Inherited from MouseEventArgs)
Y

Gets the y-coordinate of the mouse during the generating mouse event.

(Inherited from MouseEventArgs)

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

See also