Data Grid View Setting Current Row
-
-
On a data grid is there a way to set the current row number? For example if I know that the black pointer on the left is pointing at current row index 10 and I want the current row to be 11 how do I set it? DataGridView1.CurrentRow.Index is read only.
Jawa2006 wrote:
On a data grid is there a way to set the current row number?
You really want to work with a CurrencyManager, and the BindingSource class does a great job of working with an underlying data source associated with your DataGridView. The BindingSource has a Position property you can use to set the position, which is reflect in the DataGridView. Marc
People are just notoriously impossible. --DavidCrow
There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer
People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith