|
-
Jul 16th, 2010, 08:37 AM
#1
Thread Starter
Member
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
-
Jul 16th, 2010, 09:03 AM
#2
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?
-
Jul 16th, 2010, 09:05 AM
#3
Thread Starter
Member
Re: Datagrid combobox woes.
Apologies, it is a datagridview.
-
Jul 16th, 2010, 09:10 AM
#4
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
-
Jul 16th, 2010, 09:15 AM
#5
Thread Starter
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|