Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User Controls - Newbie Questions
Message
De
22/11/2004 15:47:17
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00963538
Message ID:
00963631
Vues:
7
Simon,

>>Thanks that works just fine but it is certainly more work than VFP.<

Well, perhaps a little more work, but then again I think it's all what you're used to.

>>The next thing I need to learn is how to morph the data displayed in a mmDatagrid. <

Well, I am by no means a DataGrid expert, having used a DataGrid only once and a very simple one at that ... and I have absolutely no experience with the MM framework ... so, I will leave this question to be answered by those more in the know.

~~Bonnie




>Hi Bonnie
>
>Thanks that works just fine but it is certainly more work than VFP.
>
>The next thing I need to learn is how to morph the data displayed in a mmDatagrid. I do not want to see unique ID numbers. I want to see descriptions which require a lookup in a related table.
>
>In my old VFP framework I used a listbox instead of grid and I loaded using:
>
> .AddItem(ID,ln1,3)
> .List(ln1,2)=This.SetListText()
> .Picture(ln1)=This.SetListPicture()
>
>This allowed me to customize the text displayed using the SetListText() method and add a custom image using SetListPicture().
>
>Thanks
>Simon
>
>
>>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
Répondre
Fil
Voir

Click here to load this message in the networking platform