Filtering DataGridView using Comboboxes - vb.net

Let me preface this by saying I am a beginner as far as .net knowledge.
I am developing a windows form application using tabs in VS2012 in vb. I have bound the datagrid through the designer to a sql server binding source which is populating the data. There are multiple columns in the table and these are split between two tabs with a datagrid on each tab. Both data grids have the same binding source just show different columns.
I created a view within the SQL server to pull in the column names. I think what I want to do and not sure if this is possible but have 2 combo boxes that will be used to filter. One of the would be bound to the view by a dataadapter and then the second to the datagrid binding source.
when the user selects the first combobox(columnname) it would then pull from the datagrid for that column and pull in the valid values to filter. It would then filter the datagridview and refresh it.
Then I am trying to remove the filters through the use of a button.
Can someone please help as I don't even know where to start

You can use Dataview in filtering datasources. You can refer to my answer at this question

Related

need assistance Ultragrid (infragistics). cant combine data columns from 2 sources

i have a project with winform and VB.net.
i got there 2 UltraGrids (infragistics) that each one has its own data source.
its working great but i need to do some changes.
how can i combine a field to the first from the other?
i have tried to change columns with the Ultragrid designer, even though i can see it, it doesn't show.
the first grid gets datasource and the other gets the data from SQL Query.
is it only by code or there is a shortcut?

connecting new column to visual studio through accdb

I have created a winform app connected to an access database as datasource ,
but now i have added a column in access database & now i have to provide the same field in winform for data entry purpose.
But now in my data source the new field is not visible even after refreshing .
any help in solving this.
The simplest way to do this is to open the dataset, right click on the relevant table adapter (MSdiesTableAdapter), choose Configure and then go through the wizard, adding the new column to the SELECT sql. When you finish the wizard the new column will appear in the datatable.
It won't have appeared in any databound grid etc - you'll also have to go to those grids and do an "Edit Columns" and "Add a New Column", choose "DataBound Column" and pick the new column. You can also, as a quick trick, remove the "DataMember" setting from the bindingsource the grid is bound to, then put it back
Microsoft never intended for DataSets and databases to be perfectly aligned; the dataset is your client side store of info and it may have more or fewer columns than the database, and have stuff it calculates itself locally, or relationships that are different to the database. This is why it needs manually adding and working through

Listbox not showing in subform query (Access 2010)

I have a subform that is linked to a query. The query has several fields that are listboxes linked to other queries. The listboxes work as expected in the query itself, but once I use the query in a datasheet subform, the listbox functionality goes away and I am unable to pick from the dropdowns.
Please help!
Drag and drop the fields into the form in design view, and the lookup will follow. Well, usually.
If not, you must change the textbox on the form to a combobox and recreate the settings from the query.

Using combobox in databound datagridview

Looking for a sample of a databound datagridview in vb.net. Each row needs a cell with a combobox that receives its data from an access database. The user should be able to make choices from the combobox and change the data. The data is specific and the multiple choices are always the same. This should be a simple, common situation, but not finding any samples. I know how to bind a datagridview with a database using text-style cells, but inserting a combobox appears to be way complicated.

Adding several datasource on same column in DataGridView

I'm working on VB .NET 2008.
Target: Bind dynamic datasource in a cell of a Windows.Forms.DataGridView depending on the selection in previous column. The grid must have 7 columns. If the selection on comboboxcolumn 2 or 4 is done, the datasource of comboboxcolumns 3 and 5 mus change using a query with previous selection as parameter.
In a first try to develop this functionality i've tried to use Telerik.WinControls.UI.RadGridView control. I've created a customized celltemplate with a combobox in order to have different datasource for each cell on the same column. All worked fine but seems to be some kind of bug in RadGridView, because when the combobox is presenting the list, after selection the list continued showing, doesn't dissapears as expected.
Ok, after several days of fight with RadGridView, I give up, and I tried to use same strategy but using Windows.Forms.DataGridView. I've created two classes one inherited from DataGridViewComboboxCell and other from ComboBoxColumn, in order to insert my own combbox or have the chance to have access directly to the combobox values. But the combobox showed is the default combobox not my own combobox.
Anyone knows how can I create a custom comboboxcell but using my own combo, and having access from outside to this combo?
Thanks in advance.
Regards.
You might be overwhelming the abilities of your controls. You can always break them out into parent/child or master/detail grids instead of keeping them combined into one.