Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Newbie Question
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
01179701
Message ID:
01179912
Vues:
7
Omar,

> I have a mmDatePicker control that sets the date for one of my datasets. If there is no data for the given date, the dataset will return the data for the earliest date available. The problem is than when I update the Value Property of the mmDatePicker control, the Valuechanged method fires again. All in all, the same process runs 4 times. Any ideas on how to correct this.

If you don't want the ValueChanged event to fire when you manually set the Value property, you can temporarily unregister the ValueChanged event handler, set the value, then re-register the ValueChanged Event handler.

For example:
this.mmDateTimePicker1.ValueChanged -= new System.EventHandler(this.mmDateTimePicker1_ValueChanged);
this.mmDateTimePicker1.Value = <Set the value here>
this.mmDateTimePicker1.ValueChanged += new System.EventHandler(this.mmDateTimePicker1_ValueChanged);
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
Répondre
Fil
Voir

Click here to load this message in the networking platform