Why won't the datagridview always show all records in a dataset?
Posted on 2006-07-10
have a datagridview control that works fine if there are less than four lines displayed, but gets strange when there are four or more.
When a user changes the selected date, the dataset is purged and then refilled with data appropriate to that date. I use Me.Test_for_VBdotNetDataSet_Dynamic.Clear() to clear it and Me.Native_TimeTrackingTableAdapter.Fill(Me.Test_for_VBdotNetDataSet_Dynamic.Native_TimeTracking, Me.Label5.Text, Me.MonthCalendar1.SelectionStart) to refill it. The parameters are passed to the query that fills the dataset. After refilling, the dataset has five records. I can loop through those records and confirm that they are, in fact, what is in the database. The datagridview is bound to the dataset. When I check the number of lines in the datagridview though, (Me.DataGridView1.Rows.Count.ToString) I get four rows.
Aparently, without regard to the number of records in the dataset the maximum number of rows that will display is four. I have tested with four, five, and six returned records, but I do not have data for more than that. Is there a parameter that I may have inadvertently set that prevents an initial display of more than a certain number of records?
This problem is preventing effective use of the tool I have developed and needs to be resolved ASAP. I have looked and tested and pondered, and cannot see where in my code a problem might be. At this point, I am beginning to believe that this may be a problem with the control itself. If anyone has any ideas, please help me out. Thanks in advance.