PC Review


Reply
Thread Tools Rate Thread

CollectionBase child not working properly with comboboxes

 
 
Don
Guest
Posts: n/a
 
      23rd Nov 2004
I created a class that inherits CollectionBase. It is strongly typed, only
accepting objects of a specific type. Everything works fine except when I
bind the custom collection object to a combobox. Each item in the combobox
just shows the name of the type of the objects in the list, not the result
of the ToString() method for each object in the list. Does anyone know
what's going on with this or how to fix it?

- Don


 
Reply With Quote
 
 
 
 
Don
Guest
Posts: n/a
 
      30th Nov 2004
I figured out what I did wrong. I was overriding the ToString function as a
read-only property in my class, not as a function.


"Don" <(E-Mail Removed)> wrote in message
news:K6Nod.308585$Pl.72531@pd7tw1no...
> I created a class that inherits CollectionBase. It is strongly typed,

only
> accepting objects of a specific type. Everything works fine except when

I
> bind the custom collection object to a combobox. Each item in the

combobox
> just shows the name of the type of the objects in the list, not the result
> of the ToString() method for each object in the list. Does anyone know
> what's going on with this or how to fix it?
>
> - Don
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comboboxes and mdi child window overlay Jared Microsoft Dot NET Framework Forms 1 8th Oct 2006 02:46 AM
Parent/Child form/subform not working properly =?Utf-8?B?Q2hhcGxhaW4gRG91Zw==?= Microsoft Access Forms 4 7th Aug 2006 07:09 PM
Re: how to do parent-child with two comboboxes? Greg Microsoft ADO .NET 1 3rd May 2004 09:30 AM
Master/Child ComboBoxes question Mika M Microsoft ADO .NET 1 3rd May 2004 02:39 AM
Re: how to do parent-child with two comboboxes? William Ryan eMVP Microsoft ADO .NET 0 30th Apr 2004 02:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:51 PM.