locked
Extending ComboBox RRS feed

  • Question

  • Hi all,

    I have inherited the task of maintaining C# code that was developed on NT. I am currently trying to build and run it on XP. It is building fine but isn't running.

    The problem is down to a combobox. The developer has extended the standard ComboBox to add some functionality but it appears that this extension has broken the ability to assign a datasource to it.
     
    When I try to assign an ArrayList to it the value of DataSource is = null just after the assignment, however, if I assign the same ArrayList to a standard ComboBox's DataSource property the value = the ArrayList.

    Any tips would be brill.

    Thanks
    Monday, May 16, 2005 2:00 PM

Answers

  • There is no known issues that I know of.

    However, without seeing the code there is no way I can tell whether the combo box's functionately is changed by the extension.
    Saturday, May 28, 2005 1:11 AM

All replies

  • Okay, you are going to have to post the code of the extended combo box. It is impossible to guess what is happening without seeing it.
    Monday, May 16, 2005 2:11 PM
  • Hi David,

    The code doesn't override any methods it simply provides a convenient way to determine last selected etc. I was wondering if there was any known issues with extending comboboxes and assigning a datasource to them?

    Thanks for any help
    Friday, May 27, 2005 2:21 PM
  • There is no known issues that I know of.

    However, without seeing the code there is no way I can tell whether the combo box's functionately is changed by the extension.
    Saturday, May 28, 2005 1:11 AM
  • Thanks, it seems the problem isn't with the extended combobox it is with what is being assigned to its DataSource!

    If I create a simple ArrayList and add 10 integers to the combobox's DataSource property they display ok.

    However when I add objects of one of my classes to an ArrayList and assign that to the DataSource property nothing is displayed. I have a ToString in my class and a Name property in my class that is added to the ArrayList. The combobox's DisplayMember property is also being set correctly.
     
    Do you have any advice on what could be going wrong here?

    Thanks for any help.

    Monday, May 30, 2005 10:25 AM
  • Another piece of information regarding my problem is that the original code was developed using the 1.0 .Net framework but I'm using the 1.1 .Net framework

    Monday, May 30, 2005 12:39 PM