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
3
votes
1 answer

Binding with object in Windows forms designer

I am trying to bind a list in my namespace to BindingSource through designer. I know how to bind a list in code behind but I would also like to know if it is possible to do the same in designer. Using the "Data Source Configuration Wizard", I have…
Kira
  • 1,403
  • 1
  • 17
  • 46
3
votes
2 answers

How to bind Navigation Property (second level model's two properties) in DataGridView's single column using BindingSource?

I have faced problem to show the values in grid view using binding source. I have two models as Company and Partners. I have PartnerId in Company Model, and Partner model has FirstName and LastName. I have showed the company info and partner's…
3
votes
1 answer

ComboBox.SelectedValue not working as expected

So I have a DataGridView which I am using as a “row selector” on a form, and a bunch of controls are bound to the bindingSource. One of the bound controls is a ComboBox serving as a lookup which enables status choices for the rows, this is…
3
votes
1 answer

Can a static property of a static class be a DataMember of a BindingSource?

I have static class that has a bunch of static properties. When I try to bind the property to a BindingSource (in the UI), I can pick the static class as the DataSource, however, when I drop down the DataMember combo, there is nothing there. Can I…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
3
votes
1 answer

Winforms bindingsource issue adding new record

I have the following code to load an bind data to master-detail window, where master data bound to textboxes and other controls and detail data bound to DataGridView: ON FORM LOAD: DataSet dsOrders = new DataSet("dsOrders"); …
superconsultant
  • 231
  • 2
  • 6
  • 20
3
votes
1 answer

How to bind a Navigation Property (second level properties) in DataGridView using BindingSource?

I have used two entity classes for binding values into DataGridView. One is Estimates and Companies. Estimates has columns such as "Id, Estimate Number, Estimate Amount, CompanyId". Companies has columns such as "Id, Company Name, Address" I…
3
votes
1 answer

How to get all bindingsources on a form

I have a base form with one BindingSource on it. I have a second form that inherits from the the base form, and this second form has an additional 5 binding sources. I want to get the list of binding sources that I have in the second form (ie.…
Ivan-Mark Debono
  • 15,500
  • 29
  • 132
  • 263
3
votes
1 answer

How do I find which rows have been updated in the underlying Datatable on updating the Datagridview?

This is what I am trying to achieve: DataTable populated using data from non database source This table is bound to a DataGridView using BindingSource The DataGridView is updated by the user, so that some cells now have new values. Because…
3
votes
5 answers

C# refreshing textbox from BindingSource

I am having difficulty refreshing windows forms controls that are using a BindingSource object. We have a CAB/MVP/SCSF client that I (actually “we” since it is a team effort) are developing that will interact with WCF services running on a remote…
wes
3
votes
1 answer

Customize StronglyTyped BindingSource Item Addition

I want to customize the addition of a new item into a BindingSource (all strongly-typed) as described on the following MSDN Article: How to: Customize Item Addition with the Windows Forms BindingSource The code below results in…
Steven
  • 13,501
  • 27
  • 102
  • 146
3
votes
3 answers

Windows DataGridView BindingSource Index out of range exception

Scenario: Basically i have a System.Windows.Forms.DataGridView A class that inherits BindingSource and IBindingList A class that has 2 standard List as private properties DataGridView dgv = new ... MyBindingSource bindingSource = new ... MyList…
Daniel
  • 865
  • 1
  • 8
  • 12
3
votes
2 answers

Set DataContext of a textbox to the current class in silverlight

i have a textbox in a UserControl, i created a property in the UserControl, i want to bind the textbox text property to the property created in the usercontrol. The problem is that i dont know how to especify the datacontext to the current class…
3
votes
2 answers

VB.NET How iterate through a BindingSource

I have a BindingSource bound to a DataTable. I use the BS Filter and would like to iterate the filtered dataset of the DataTable using the Bindingsource. I know I can do a MoveFirst and the MoveNext and each time using the BS.Position get the…
Alex
  • 2,081
  • 14
  • 49
  • 76
3
votes
2 answers

VB.Net binding datagridview Comboboxcolumn to datagridviewTextboxColumn

I am loading data from two tables: institute and country. Institute has 3 columns: instId, name, countryId. And country has 2 columns: countryId, name where countryId is a foreign key from country table. I fill these two tables in dataset. I have…
Hilal Al-Rajhi
  • 437
  • 6
  • 25
  • 49
3
votes
1 answer

Binding to nested property only showing first item in list

I am trying to bind a ListBox Control in C# Winforms in .NET 4.5 to a list of objects that have a nested property that I wish to use for a DisplayMember. It sort of works except that when I set the DisplayMember to the nested property the listbox…
jeffreyk
  • 123
  • 1
  • 8