Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem Deleting
Message
 
À
18/07/2013 08:54:10
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 4.0
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01578432
Message ID:
01579019
Vues:
51
>>Frank,
>>
>>>I stepped through the code and it is showing me that no deletion occurs because the code looks for a business object, but my form is bound to a table. (See my first message as to how the form's datacontext is set.)
>>>
>>>Any ideas on how to handle this scenario?
>>
>>Did you set the BindingSource property on the mmButtonDelete control on that window? If you are using class MM .NET entities, there needs to be an IgnoreNavigation = true inserted into the call path of the DeleteEntity to prevent the display of the Save Changes dialog (mmBusinessUIHelper.DeleteEntity) This only occurs with business objects that are using the datatable or dataviews.
>>
>>Best Regards,
>
>Kevin,
>
>no, I did not set the BindingSource property on the mmButtonDelete.
>
>Can you give me an example of how I do that, please?
>
>Once I set that binding source then things will delete properly, or do I need to add in more code to handle the delete myself?
>
>If so could you please provide an example?

The information you need is in the WPF section of the MM .NET Dev Guide under the topic "Using Specialized Buttons". After following the instructions in this section to associated a business object with the button, then there is one other step you need to take. Override the DeleteEntity method in your WPF window and add code that does the following:

1. Set the IgnoreNavigation property = true.
2. Call the default DeleteEntity method
3. Set the IgnoreNavigation property = false.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform