Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Now to subclass a grid
Message
De
02/11/2010 11:38:10
 
 
À
02/11/2010 05:41:01
Information générale
Forum:
ASP.NET
Catégorie:
Conception classe
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01487795
Message ID:
01487866
Vues:
35
>I have found that if I create a "user control" with the grid, I can amend the user control class and that updates in the form. Is this an acceptable method of coding? don't quite understand the difference between a "User Control" and a straight forward class.

I wouldn't use the UserControl if it's for a single control. IOW, all you'd be putting on the UserControl would be the Grid. If you were designing a control that had, as an example, a TextBox and a Button and they had to work together for some reason, then that's when you put them both in a UserControl.

So for your grid, you should just be sub-classing it in code. Use Viv's suggestion (I know it's a PITA, but it'll work once you extract all the pieces you need into your class).

~~Bonnie
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