DataGridViewRowPostPaintEventArgs::RowIndex Property
.NET Framework (current version)
Gets the index of the current DataGridViewRow.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The row index can be used to access the current row within a DataGridViewRowCollection.
The following code example demonstrates how to use the RowIndex property to access the current row. The code gets the value of the cell at the intersection of the selected row and the third column, and then paints this value over the entire row. The variable, e, is of type DataGridViewRowPostPaintEventArgs. This code example is part of a larger example provided in How to: Customize the Appearance of Rows in the Windows Forms DataGridView Control.
.NET Framework
Available since 2.0
Available since 2.0
Show: