Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Coordinating Objects
Message
De
26/08/2007 12:05:58
 
 
À
25/08/2007 15:16:54
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Divers
Thread ID:
01250452
Message ID:
01250496
Vues:
11
John,

I'm not sure I understand your control model. Our DateTimeControl consists of a UserControl, on which two TextBoxes (one for Date one for Time) and a button are placed. Clicking the button pops up a Calendar control.

Our DateTimeControl is databound like any other control (passing the table and column to be bound), and then the DateTimeControl's DataBind method binds the appropriate pieces to the two text boxes. Regular Expressions and Event Handlers are used to make it all work together. Our DateTimeControl is a very complicated control (and off the top of my head, I don't remember all the events that are used) ... it took one of our brightest developers close to 6 weeks to get it all working right, (although that was back in 2002 when we were all still learning C# ... it probably would take him less time now if he had to do it all over again, which thankfully isn't necessary <g>).

Because it's so complex, I can't post the code for it (and I doubt if our company would let me anyway), but maybe my above explanation of how it works might help?

~~Bonnie


>I am working on a time picker control and am trying to decide on the best way to coordinate the value of the control between the various objects invlolved.
>
>
>Dataset
>  TextBox
>    DropDownForm (Form)
>      TimePicker (UserControl)
>        LabelArray (Acts like option buttons)
>
>
>The dataset to the textbox would just be a binding source.
>
>But for the rest of them the data needs to cascade downward from the label array down to the TextBox.
>
>In c++ I could use pointers, but that doesn't seem advisable in c#
>
>I'm guessing that raising events is going to be my best solution, but was curious to find out if there was some way to do this that I had not though of.
>
>And, also if events are the way to go, what would be the best/most usual event to use?
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform