skip to content
User Tools
Site Tools
Search
Tools
Show pagesource
Backlinks
Media Manager
Log In
>
Trace:
•
2024-12-11-001
blog:2024-12-11-001
2024-12-11 C#: Index of Currently Selected Row in DataGridView
Source:
https://stackoverflow.com/questions/3578144/index-of-currently-selected-row-in-datagridview
It's that simple. How do I get the index of the currently selected Row of a DataGridView? I don't want the Row object, I want the index (0 .. n).
Solution
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.
TAGS
3 person(s) visited this page until now.
Back
Permalink
blog/2024-12-11-001.txt
· Last modified: 2024/12/11 09:09 by
jethro
Page Tools
Log In
Show pagesource
Back to top
Print
Backlinks
Media Manager
oeffentlich