On a Windows Form I have a DataGridView control with records that is filled by a data source (data binding). Each record presents a data object.
Not all the rows are displaying: only the first 10 for example. So the user can scroll down to see the another records. When the form loads the first item in the grid is selected by default (by the BindingSource) Nothing special about this, but if the user uses the scroll bar to see the 12th element and then clicks on it to select it the datagridview resets its position to the 2th element (as if the scroll bar was not used)
But in case the user first manually select any of the 10 first elements of the DataGridView by using the mouse (the grid has not the focus) and then scroll to the see the 12th element and select it the 12th element is selected as expected.
Any clue on what's happening?
Aucun commentaire:
Enregistrer un commentaire