Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie Question
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Title:
Miscellaneous
Thread ID:
01179701
Message ID:
01179912
Views:
6
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
Previous
Reply
Map
View

Click here to load this message in the networking platform