locked
Bind a tabel with a ToolStripComboBox RRS feed

  • Question

  • Hi, 

    I wont to use a ToolStripComboBox from a ContexmenuStrip, to bind with a tabel from the database.

    I have a error, when a try this:

    "Error1 'DataSource' is not a member of 'System.Windows.Forms.ToolStripComboBox'." 
    
    

     

    How do i bind a tabel with a ToolStripComboBox?

    Thanks,

    Gr Holland

    Sunday, December 18, 2011 6:33 PM

Answers

  • ToolStripComboBox1.ComboBox.DataSource = "your data source"
    

    Sunday, December 18, 2011 11:55 PM
  • Hi,
     Welcome to MSDN forums..
    Check this link..
    http://www.vbforums.com/showthread.php?t=667787
    http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/b1e3c2f8-f8d9-4bca-a4cd-e7aaabdf35cd
    By A Pathfinder..
    JoSwa

    If you find an answer helpful, click the helpful button. If you find an answer to your question, mark it as the answer.
    Monday, December 19, 2011 1:35 AM

All replies

  • Hi freddiebunt,

     

    I guess to unse My.Settings. When you change the index of ToolStripComboBox read the index of selected item and save it.

    In your FormLoad Event check this value and set the index as current value.

    Good luck.


    Liebe Grüße Stefan | Cheers Stefan I'm using VB 2008 Express Be a good forum member - mark posts that contain the answers to your questions or those that are helpful c# in vb Translator: http://www.developerfusion.com/tools/convert/csharp-to-vb/
    Sunday, December 18, 2011 7:46 PM
  • ToolStripComboBox1.ComboBox.DataSource = "your data source"
    

    Sunday, December 18, 2011 11:55 PM
  • Hi,
     Welcome to MSDN forums..
    Check this link..
    http://www.vbforums.com/showthread.php?t=667787
    http://social.msdn.microsoft.com/forums/en-US/winformsdatacontrols/thread/b1e3c2f8-f8d9-4bca-a4cd-e7aaabdf35cd
    By A Pathfinder..
    JoSwa

    If you find an answer helpful, click the helpful button. If you find an answer to your question, mark it as the answer.
    Monday, December 19, 2011 1:35 AM