Susan Harkins
ssharkins at gmail.com
Thu May 21 11:32:38 CDT 2009
Okay, the statement didn't require a sub of its own. I dropped the statement into the existing sub that filled the tableadapter and it works just fine! Susan H. > Okay, after discussing this a bit with Charlotte, she says the problem is > the TableAdaptor -- the VB Configuration Wizard uses a TableAdapter to > populate the control. I'm researching this morning, but I can't seem to > find anything on editing the TableAdaptor to show only the last few > records and the edit row, instead of displaying all of the records. > > Any help? > > Susan H. > >> Using VB Express 8, I added the following to a form class with a >> datagridview control, expecting it to limit the number of rows displayed >> in the grid, so that the edit row is immediately visible. It doesn't >> return an error, but it doesn't seem to do anything at all either -- view >> is the same with or without this sub. >> >> Private Sub CustomersDataGridView_RowValidated(ByVal sender As Object, >> ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles >> CustomersDataGridView.RowValidated >> >> CustomersDataGridView.FirstDisplayedScrollingRowIndex = >> CustomersDataGridView.Rows.Count - 5 >> >> End Sub >> >> Susan H. >> >