Information générale
Catégorie:
The Mere Mortals .NET Framework
Titre:
MmDataGrid.OnMouseDown() problem
Hi Kevin,
1.3 Beta, mmDataGrid.OnMouseDown() seems to have 2 issues:
1) On my simple mmBusinessForm override I have MultiSelect = False. If I add a new row by clicking the New button and then Save it by clicking the save button the grid control, which is the navigation control, shows the new row only highlighted. That's fine. But when I mouse click on another row to select it this.OldSelectedRow holds the number of the row which was selected prior to clicking the new button. A trace of the code shows that this.OldSelectedRow is not being updated when a row is added.
2) If I add a new row, click another row, click back to the new row, delete the new row, then click to another row I get an array out of bound error when UnSelectRow calls
this.UnSelect(rowNum);
because rowNum doesn't exist. OldSelectedRow is not getting updated when a row is deleted either.
I was able to get around this by overriding mmDataGrid.RowChangedHandler() and adding this code to the bottom:
If Not Me.MultiSelect Then
Me.OldSelectedRow = e.CurrentRow
End If
Thanks,
Max...
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement