Events
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The following code example demonstrates how to configure a DataGridView control so that clicking anywhere within a row automatically selects the entire row, and so that only one row at a time can be selected.
this.dataGridView1.SelectionMode =
DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.MultiSelect = false;
With Me.dataGridView1
.SelectionMode = DataGridViewSelectionMode.FullRowSelect
.MultiSelect = False
End With
This example requires:
A DataGridView control named
dataGridView1
.References to the System and System.Windows.Forms assemblies.
.NET Desktop feedback feedback
.NET Desktop feedback is an open source project. Select a link to provide feedback: