Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Navigation grid changes row on cancel
Message
De
22/01/2005 21:34:36
Max Fillmore
Essential Skills, Inc.
Lenexa, Kansas, États-Unis
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Navigation grid changes row on cancel
Divers
Thread ID:
00979740
Message ID:
00979740
Vues:
57
Kevin,

MM.NET ver. 1.3 Beta 4

In my form (based on my subclass of mmBusinessForm) I have a grid (grdList) which is set as the navigation control with

' Register the grdList DataGrid as the Navigation control
Me.NavControl = Me.grdList

I also have form.DisplayNavigationToolbar = ToolBarOnMainForm

I make a change to data in the current row and then attempt to navigate off the row before clicking the Save button by left mouse clicking on the Main form tool bar "Next" button. When the AskSaveChanges dialog comes up I select Cancel. The cancel works and the highlight on grdList stays on the current row. Everything works fine.

If I make the same edit but attempt to move off the current row by left mouse clicking on another row in the grdList grid control and again select Cancel from the AskSaveChanges dialog the edits do not save but the grid highlight moves. This happens with both Multiselect = True and Multiselect = False.

The problem seems to be in mmBusinessForm.NavigateData()

public override void NavigateData(mmNavigate navPosition, bool raiseEvents)
...
if (this.IsChanged())
{
...
// Ask the user if they want to save changes
DialogResult result = this.AskSaveChanges();
...
if (result == DialogResult.Cancel)
{
return;
}

If the user selects Cancel the code does a return. It appears that there is no mechanism in place to restore the row highlight to it's pre-click position. Indeed since NavigateData() has no return value and no output parms I can't think of an easy override to correct this shortcoming.

Am I missing something here?

Can you please provide a fix for this?

Thanks,
Max...
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform