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

Translate DataGridView cells

i have my class with 4 public int properties. What i'm trying to do is to bind List to BindingSource as DataSource and that BindingSource to DataGridView. Everything works perfectly, now i'm trying to "translate" cells value to something else. For…
Marduk
  • 359
  • 4
  • 13
0
votes
0 answers

C#, BindingSource and DataSource

Example: public class MyProperty { //something.. } public class MyClass { private MyProperty[] myProperty = null; public MyProperty[] myProperty { get { //execute some code return…
JJ_Jason
  • 349
  • 8
  • 24
0
votes
1 answer

Binding DisplayValue to a different Source than the Control's DataSource

Say I have Tasks and Employees, each with their respective table in the database. There would be a many to many relationship between them, and as such there would be a third table for Assignments. If I create a listbox that is bound to a…
Totty
  • 926
  • 2
  • 9
  • 18
0
votes
1 answer

How to populate data to GridControl from Web Service?

I have a problem with adding rows/cells values to GridControl. I am using Web Service as data source. My web service function runs perfectly and returns an xml type of…
choz
  • 17,242
  • 4
  • 53
  • 73
0
votes
1 answer

Binding-Source CancelEdit() doesn't work for saved objects in entity framework

My app is C# winform. I saved my data in sql database with entity framework, but when I want to edit them the binding-source when user changes the data, but don't want to update the current object CancelEdit() doesn't work. My binding-source…
Arman
  • 1,019
  • 2
  • 14
  • 33
0
votes
1 answer

Child bindingsource bound to child entityset does not update

I have a table, SampleData, that has a child table, Measurements. On my WinForm, frmMain, a single SampleData object is bound to the SampleDataBindingSource; the MeasurementsBindingSource has SampleDataBindingSource as its datasource and…
blueshift
  • 831
  • 2
  • 12
  • 24
0
votes
1 answer

Filter on bindingSource for a datagridview doesn't work

I have 5 datagridviews, with 5 to 15 columns each... So I'm trying to automate the filtering a little bit. But I just can't get it to work at all! I My bindingSource uses A BindingList implementing Sortable :…
Ludovic Migneault
  • 140
  • 1
  • 4
  • 19
0
votes
1 answer

vb.net detail datagridview from list property of a master dgv

I have a model class which have as a property, the list of details table related to it. Ex, my master table contains datas about the package (date, cost, number) And the detail table contains datas about pieces in the package (length, number, qte,…
0
votes
3 answers

LINQ to SQL datagridview query returns length, not value

I've got a Windows Form with a button and a datagridview. The project includes a working database connection and LINQ to SQL class. I'm trying to bind the datagridview to the LINQ to SQL. In a code module I've got this: Public Function…
0
votes
1 answer

C# get parent control (UserControl or Form) from inside a BindingSource extension method

I am creating an Extension method for the .net BindingSource object. Currently the method needs a Control passed in (this Control is the "main" Control which is normally a UserControl or a Form). I would like how ever, to not have to pass this…
Landin Martens
  • 3,283
  • 12
  • 43
  • 61
0
votes
2 answers

In C#, How to cancel the default mouse click event when using bindingNavigator

I am a new C# user and now I have encountered a problem in using BindingNavigator. I am using bindingNavigator to update records in a table of database. Before I leave current updated record and enter the next record by clicking Next button, I will…
Wintop088
  • 3
  • 1
  • 3
0
votes
1 answer

DataGridView binding to Acces database issue

I have a DataGridView which is binded to an Acces Database. I can update the database well if I make edits directly in the DataGridView, but if I use something like: dgView.Rows[0].Cells[1].Value = "Some text"; It will write the text in the 1st…
Valentin Radu
  • 629
  • 1
  • 11
  • 26
0
votes
1 answer

Binding an XElement to BindingSource c#

I am reading some xml and I was wondering if is possible to bind an XElement to a binding Source and bind the binding source to a datagriview winforms. I have tried all sorts but no success. Each Element within this Xelement must create a data row…
user9969
  • 15,632
  • 39
  • 107
  • 175
0
votes
1 answer

How Do I get a Bindingsource to see a record added with the TableAdapter.Update() method without using .fill?

I have a large dataset that load in with a fill method on page load. Then, a record can be added to the dataset. All of that works fine, but the only way that I can get the bindingsource to recognize the new record is to do a fill method. This also…
Kassabba
  • 340
  • 4
  • 15
0
votes
1 answer

Using DataGridView with BindingSource.DataSource=List, need to bind to inherited type of T

I'm looking to resolve databinding to a Winforms datagridview using C# & .Net3.5. It's a bit involved and encompasses a few classes which I will provide code. I have have an Interface defined as such: public interface MyElement : IEditableObject { …
Lorentz
  • 181
  • 1
  • 3
  • 13