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

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?

Related

VB.NET DataGridView Cell Editing

Edited / re-written due to jmcilhinney's comment...
I have a project which uses several DGVs bound to an Access db. The form designer show 3 data sets for some reason, even though the solution explorer shows only one and all the tables are shown in that one data set's designer.
I can edit the first DGV but not another on the same form, the first is filled with the following...
Me.PingMonitorPLC_IPsTableAdapter.Fill (Me.PingMonitorDataSet.PingMonitorPLC_IPs)
And the other is filled with the following code...
Me.ActiveAlarmsTableAdapter.Fill(Me.PingMonitorDataSet1.ActiveAlarms)
jmcilhinney's comment is that I must be doing something wrong, the form load event only runs the code listed above.
I dont know why I have 3 data sets listed on the form designer and I am too scared to go deleting things as I have lost an entire project before because I corrupted the designer by deleting controls etc.

vb.net datagridview and bindingsource

Im in the process over converting some legacy VB6 code over, in particular a TDBGrid linked to an ADODC data control.
Everything is going ok, ive got my columns and bindignsource reading sweet as a nut and performing what its supposed to do, correctly - but im having a problem converting this type of method over.
In the vb6 app, while a user scrolls through the grid, the grid fetchstyle (similar to cellformatting) go looking at the equivalent row of data in the adodc.
In .net, I cant seem to get that functionality to be the same, unless I add that field from the database, into a column in the grid and make it invisible (which I dont really want to be doing if i can help it) then read the cell via cellformatting and then perform some action, such as changing the cellstyle backcolor to something.
Is it possible to refer to a row in the bindingsource that would be the same row in the grid that a user is at, without having that field from the bindingsource - in a DGV column?
or do i just have to put up with placing more columns in the DGV than I want and just live with it?
Thanks!
I think you want the BindingSource.Current
object.

Filtering DataGridView using Comboboxes

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

Use databinding controls to add records to a dataset

I imagine this is a terribly Noobish question, and I hate to ask, but I've been trying to solve this problem all day,
I need to add rows to a DataSet using databound controls in VB.net.
I've set up the data bindings themselves, they're bound the the correct controls, and the BindingSource uses the correct DataSet. The DataSet is filled from the DataAdapter correctly, and the binding source works, as the navigation controls all work fine.
Here's the noob part: How do I use the controls to add new data to the DataSet?
I've been grappling with this all day. I've tried Google, this board, other boards, MSDN, everything I could think of, and nowhere did I find a simple tutorial on how to do it. Either I'm as thick as two short planks, or it's not as simple as I assumed it would be.
Could anyone help me with this please? It's driving me mad.
I guess there must be some kind of end-edit involved which would enable me to insert, update and delete records in the DataSet (as you would use with DataGridViews)
You can't add new data to the DataSet directly, you can add rows to the DataTables that reside in your DataSet.
You should have a button "Add item" or something like that, and in the event handler add the row to the data table. Ensure that the user can edit your edited row with your bound control and add a button "Save" which would do a TableAdapter.Update() on changed DataTable.
If you use a DataGridView, setting the property AllowUserToAddRows = true would add an empty, "dirty" row in which user can type data to add new records to the DataTable.
This two should get you started:
Walkthrough: Saving Data to a Database (Single Table)
Editing Data in Datasets

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.