Results 1 to 3 of 3

Thread: passing own created dropdownlist to existing dropdownlist

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Belgium
    Posts
    99

    passing own created dropdownlist to existing dropdownlist

    Hello,



    I've created a class which contains a dropdownlist property.

    Right now, I want to pass this dropdownlist to an existing one
    VB Code:
    1. in my class:
    2.     Public ReadOnly Property HoofdNummer() As DropDownList
    3.         Get
    4.             FillList
    5.             Return _HoofdNummer
    6.         End Get
    7.     End Property
    8.  
    9. This is on my page :
    10. Dim oMachine As New Uitrusting
    11.  
    12. me.ddlExisting= oMachine.HoofdNummer

    This seems to work if I look in debug mode, my ddlExisting receives all the values but once it's on the page, I don't see any values in the list.

    Has anyone got a clue ?

    Thx,

    Bjorn

  2. #2
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    I think a better approach is to pass back from your class something that is bindable to the forms listbox, instead of passing the UI control. - This is often bad design and limits your UI.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2002
    Location
    Belgium
    Posts
    99
    Thx for your answer.

    I know what you mean but what should I pass back for a combobox ? I don't want to pass back my datatable, cause then I still need to point the valuemember etc.

    I just want to databind something which is immediately ready for my combobox.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width