Results 1 to 2 of 2

Thread: User Control with DataSource, DisplayMember and ValueMember property

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2009
    Posts
    2

    Exclamation User Control with DataSource, DisplayMember and ValueMember property

    Hello...

    I need to create a user control which can be used in my all projects. I have created a user control with a TextBox Control and a ListBox Control. My goal is that as soon as any character is pressed in the textbox, Listbox's item which starts from that character should be selected. I have done all the coding needed for the functionality but my problem is that when I add this usercontrol to my form, I should be able to change the DataSource, displaymember and valuemember properties at designtime. But I cannot see these properties when I add the control on the form. Any suggessions please.

    Regards,
    Thanks.
    Dinesh Kumaar

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: User Control with DataSource, DisplayMember and ValueMember property

    There's no need for your control. Just use a ComboBox with its DropDownStyle set to Simple. You can inherit it and add that functionality or just handle the TextChanged event in your application code.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Tags for this Thread

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