VS 2008 Datagrid combobox woes.-VBForums
Results 1 to 5 of 5

Thread: Datagrid combobox woes.

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2009
    Posts
    39

    Datagrid combobox woes.

    Hi,
    This is probably a really easy question but i cant seem to find an answer anywhere.
    I've got a datagrid in which the first 2 columns are comboboxes.
    I have them populating from 2 different datasets but what i need is for the second one to be filtered, depending on what is selected in the first.

    How is the best way to pass the selected value from the first combo to the query in the second?

    On a related note, how can i set the combos to values i pull back from a query?
    Basically I'm running a query to pull back a load of information that has been previously entered and then populate the grid so that it can be viewed/amended, but i cant seem to set the value (or the display value) to what i pull back, even when it appears in the list of options in the drop down.

    Hoping you can help

    Thanks

    Gimbal

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    96,548

    Re: Datagrid combobox woes.

    First things first: is it really a DataGrid, or is it actually a DataGridView? If you're creating a WinForms app in VS 2008 then the default should be a DataGridView. It's important to always use the proper names for things to avoid confusion because the answer would be different for each. If it really is a DataGrid, is there a particular reason that you're using it in preference to the generally superior DataGridView?
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    MSDN "How Do I?" Videos: VB | C#
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2009
    Posts
    39

    Re: Datagrid combobox woes.

    Apologies, it is a datagridview.

  4. #4
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Smile Re: Datagrid combobox woes.

    Hope this link will give you a direction to start....

    http://bytes.com/topic/net/answers/6...ta-grid-vb-net
    thanks
    amrita

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2009
    Posts
    39

    Re: Datagrid combobox woes.

    Thanks for the link, I'll have a look and post back here with how i got on.

    Any other suggestions are still welcome though.

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
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.