Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Controls - Newbie Questions
Message
De
22/11/2004 14:17:38
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00963538
Message ID:
00963601
Vues:
7
This message has been marked as the solution to the initial question of the thread.
Simon,

Your controls are probably private and thus won't show up. You could just make them public and that allows them to be accessed in code on the form where you dropped the UserControl, but that doesn't allow them to show up in the Property Sheet. So "real" properties are what you need.
private mmDataGrid m_oGrid;

public mmDataGrid oGrid
{
  get {return this.m_oGrid;}
  set {this.m_oGrid = value;}
}
And then oGrid will show up in the property sheet.

~~Bonnie


>Hi
>
>I created a user control that contains a mmDatagrid and several other controls. However, when I drop it on a form there is no way to set the Datagrid BindingSource etc. and the property sheet does not show me the contained controls as it does in VFP. So I am wondering what is the best practice in terms of building such controls so that these properties are available in the Designer? Is it poor design to build such user controls? Are these properties just hidden from the designer but available in code?
>
>In VFP I had a standard navigation control that included a grid and nav buttons all in one container that I dropped on to a form I was thinking of using the same technique in .Net but am wondering whether this is a good idea or not.
>
>Thanks
>Simon White
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