There is the RowIndex
property for the CurrentCell
property for the DataGridView.
datagridview.CurrentCell.RowIndex
Handle the SelectionChanged
event and find the index of the selected row as above.
More Related Contents:
- How to handle click event in Button Column in Datagridview?
- List vs BindingList Advantages/DisAdvantages
- DataGridView bound to a Dictionary
- Refresh DataGridView when updating data source
- how to bind datatable to datagridview in c#
- CRUD Operations using DataGridView, DataTable and DataAdapter – Cannot add new row to DataGridView
- How to change the color of winform DataGridview header?
- Show row number in row header of a DataGridView
- How to filter data using Entity Framework in a way that DataGridView be editable and context track changes?
- Adding Text to DataGridView Row Header
- Show Loading animation during loading data in other thread
- DataGridView keydown event not working in C#
- How to create a Button that can send keys to a conrol without losing focus – Virtual Keyboard
- DataGridView with Button Control – Delete Row
- Why is my bound DataGridView throwing an “Operation not valid because it results in a reentrant call to the SetCurrentCellAddressCore function” error?
- WinForms DataGridView – databind to an object with a list property (variable number of columns)
- How to refresh datagridview when closing child form?
- DataGridView Image for Button Column
- How to create a Button that can send keys to a control without stealing the focus – Virtual Keyboard
- Make an Installation program for C# applications and include .NET Framework installer into the setup
- How to compare two rich text box contents and highlight the characters that are changed?
- Application.Exit
- How can I draw a rounded rectangle as the border for a rounded Form?
- Pass click event of child control to the parent control
- Change the borderColor of the TextBox
- Synchronize Scroll Position of two RichTextBoxes?
- Developing C# on Linux [closed]
- How to install a Font programmatically (C#)
- Disable WinForms ProgressBar animation
- Custom Color Palette in Visual Studio Color Property Editor