Questions tagged [bindingsource]

BindingSource is a .NET class that encapsulates the data source of a Windows form.

BindingSource is a .NET class that encapsulates the data source of a Windows form. A rough equivalent in the Java standard API might be RowSet.

682 questions
0
votes
1 answer

Binding a ComboBox to two sources

So I've got a List that I bind my ComboBox to through a BindingSource. Works fine, no problem. Now I need to add one more item to my ComboBox that is not available in the List (and I can't modify contents of the List either). The following…
dotNET
  • 33,414
  • 24
  • 162
  • 251
0
votes
1 answer

Has the DataSource been changed via a BindingSource?

I'm using a BindingSource to connect a single large data-structure to numerous controls (no SQL, just one data-structure, lots of controls). Old-style Windows Forms application, Visual Studio 2012 Express. I have managed to wrap numerous GUI…
Dave Nadler
  • 316
  • 4
  • 15
0
votes
1 answer

BindingSource Filter and querying

I filtered my BindingSource and can notice the results great on a gridview control that is tied in... but when I iterate through manually, I am not getting expected results. Here is the code: CollectorAlertsBindingSource.Filter =…
cb seo
  • 103
  • 12
0
votes
0 answers

datasource of the binding source becomes null after setting its filter

I filled the datasource of a control and then try to apply the filter. But after applying filter, it updates the datasource of the binding source to 0. private void SetFilterIntoBindingNavigator() { try { if…
user2691432
  • 93
  • 1
  • 2
  • 10
0
votes
1 answer

Edit collection of BindingSource

I have this situation: I have a List or an Array (haven´t deciced which one is better for my purpose, but it doesn´t matter) of some objects (for example list of Persons). In my form there is a DataGridView where I want to see all persons and their…
DanielH
  • 953
  • 10
  • 30
0
votes
0 answers

Disassociate row selection between two devexpress gridcontrols that are bound to the same bindingsource

I have created a form that has a GridControl in it that is bound to a BindingSource upon instantiation. I intend to have the user be able to have multiple instances of this form open at the same time, while being able to have different filters…
Jake Smith
  • 2,332
  • 1
  • 30
  • 68
0
votes
1 answer

Show nested value entity in textbox on databinding (c# - winforms)

I have an entity with others entities inside. Per example, Entity A has entities B and C. So, I want to show in a text box the value of A.B.SomeProperty when I set a datasource for bindindsource. Is it possible with a workaround? tks
Fernando
  • 436
  • 4
  • 13
0
votes
1 answer

Nhibernate bag with bindingsource

I'm using a bindingsource to fill a form from Nhibernate list: public class Customer{ public string Name { get; set;} public IList Orders { get; set;} } bindingSourceCustomer.DataSource =…
Nour
  • 5,252
  • 3
  • 41
  • 66
0
votes
1 answer

DevExpress Report must filter BindingSource with Parameters at the datasource level

I am trying to bind a XtraReport to a BindingSource (instead of a Dataset) and want to filter the values in the datasource before they get to the report using report parameters. I have already declared the parameters and the bindingsource in the…
John
  • 3,591
  • 8
  • 44
  • 72
0
votes
3 answers

How do i bind data source to a ComboBox?

So i currently have two combo boxes. One Being Manufacture the other being model. My sql query looks like this "Select Distinct Model From sheet1 where (Manufacture =@Manufacture)" this works when i execute it and if i were to fill a datagridtable.…
0
votes
1 answer

BindindSource Filter does not work

Please see the following code on a Winform Load method: List res = new List(); res = _CustomerBO.GetCustomers(); customerBindingSource.DataSource = res; customerDataGridView.DataSource =…
0
votes
1 answer

c# dictionary bound to listbox

Hi I have a dictionary which I bind to a bindingsource. I would like to display the keys in a listbox. So i add the bindingsource to the listbox and set the displaymember to "Key". This does not work. It gives me the tostring of the dictionary…
benst
  • 553
  • 2
  • 12
  • 32
0
votes
1 answer

How to create a master detail insert form

i'm using the Northwind database and I want to create a C# .Net Framework windows form to generate an order input. I already linked the tables in my dataset and the binding source and used the binding navigator to be able to view each one of…
Anyul Rivas
  • 655
  • 2
  • 12
  • 31
0
votes
1 answer

How to use bindingsource.filter using a var?

I have a query that takes the first and last name from text boxes and I get a var. This works if I want to change the datasource but that does not help me much as it breaks a lot of code doing it that way. I would prefer to use .filter. How can I…
korrowan
  • 563
  • 2
  • 15
  • 37
0
votes
6 answers

add row to a BindingSource gives different autoincrement value from whats saved into DB

I have a DataGridView that shows list of records and when I hit a insert button, a form should add a new record, edit its values and save it. I have a BindingSource bound to a DataGridView. I pass is as a parameter to a NEW RECORD form so // When…
Ruben Trancoso
  • 1,444
  • 5
  • 27
  • 55