Questions tagged [bindingsource]

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

0
votes
0answers
8 views

C# Automatic numbering Datagridview

Is it possible in datagridview with a bindingsource when adding a new row it's copy the last cell name and put a number to it? Copy the name is not a problem but the number after the name i can't get ...
0
votes
1answer
55 views

How to get the name of bindingsource which is currently binding to a control

I have a textbox and I add bindingsource into it as a databinding, and then I want to get the name of the bindingsource, which is in the example bellow the bindingsource name is "bindingSource1". How ...
1
vote
0answers
21 views

C# Bindingsource filtering

I've got a question about filtering of a bindingsource in C# (Visual Studio). I've got a large amount of rows with data which I'd like to filter on two columns, namely the city and the number of ...
-2
votes
0answers
10 views

suspend all bindingsources of a datatable

I have a datatable dtCustomers in my vb.net project and I have created DataRelationship of this table to many other datatables (nearly 20 other tables) inside a dataset 'dSet'. Each of those ...
0
votes
0answers
18 views

How to use textbox to search data in DataGridView with Binding Source? [duplicate]

I tried to make a little search function on the data grid view with a list of people in there. and the DGV is populated from studentListBindingSource I tried the code below but it always throws ...
0
votes
1answer
36 views

ComboBox SelectedValue is null

I'm trying to get the .SelectedValue of a ComboBox, but it keeps returning null instead of the actual value in .ValueMember. I tried a couple of different approaches, and came up with this: DataTable ...
1
vote
2answers
34 views

How do I show the display value for a combo box for the bound item?

I have a windows forms combo box that isn't showing the display value for the current record. The drop down list is showing the right values--Box, Skid, Tray--but the initial value in the text box is ...
0
votes
0answers
12 views

Problem with assigning dataMember property in BindingSource objects

I have a scenario where I have 3 tables for example if I have Unit table that is linked to two other tables ( UnitGroup & UnitGroupDetail ) how to create their BindingSources correctly I write ...
0
votes
0answers
17 views

assigning BindingSources with DataMembers shows 'DataMember property 'Unit:UnitGroup' cannot be found on the DataSource.'

I have a scenario where I have 3 tables for example if I have Unit table that is linked to two other tables ( UnitGroup & UnitGroupDetail ) how to create their BindingSources correctly I ...
0
votes
1answer
20 views

how to check the new added record values to BindingSource

how to check the new added record values to BindingSource before I save it to the database in C# ? I want to create a method that checks the values in the Added row in the bindingsource and update ...
0
votes
0answers
11 views

set TableAdapter field value without Textbox c#

I have a TableAdapter bonded to a form controls (TextBox's). Some columns a linked to TextBox, but there is some other fields that i don't need to bind to textbox's or other controls, i need to set ...
1
vote
1answer
27 views

Applying two keyword filters to SINGLE column in Datagridview. VB

I've been struggling to figure out where this strand of code is going awry... I'm currently trying to filter a Column in my datagridview, via my binding source, with two Strings at the same time... I ...
0
votes
0answers
51 views

Binding to multiple properties is Xamarin Forms

I'm trying to figure out how to bind a ListView to two or more objects in Xamarin forms... I want to keep the objects separate because they both correspond to different tables in a database. Is it ...
0
votes
0answers
24 views

Binding entity property to combobox not working as expected

I have an entity, eg: public class Entity { public Enum1 FirstEnum { get; set; } public Enum2 SecondEnum { get; set; } } This entity is bound to a BindingSource which in turn binds controls ...
0
votes
0answers
17 views

Binding ComboxBox SelectedItem to Property on ViewModel

I am having trouble trying to figure how to bind my combobox selected item to a property on a ViewModel where the Data Source of the combobox is from a BindingSource control as shown below: View ...
0
votes
0answers
65 views

c# DataGridView CommitEdit causes every cell in the table to reload

Having a really annoying issue with a DataGridView in a C# WinForms application. I have a DataGridView called dgvInvoices, which uses a BindingSource bsInvoices as its datasource. bsInvoices has a ...
3
votes
1answer
44 views

Saving a picture from picturebox to database with bindingsource c#

Sorry if the answer is going to be obvious. I'm busy with a winforms app in c# with a sqlcompact DB. I'm using a dataset, bindingsource, tableadapter, adapter manager, binding navigator. I have been ...
0
votes
1answer
23 views

Binding source.filter between two strings VB.net

How can I filter a binding source between two strings. I've tried the following: BindingSource. Filter = "[field]>= '" & value1 & "' and [field] <= '" & value2 & "'" But the ...
0
votes
1answer
32 views

Is there a way to stop myDataSet.HasChanges() returning true if the only change is a new row?

I have a Button on my Form that when clicked calls myBindingSource.AddNew(). Controls relevant to setting the values on that new row then become visible. On the close event of that Form i call ...
1
vote
1answer
30 views

Two ComboBox with same DataSource causes Selection to be forgotten

I have BindingSource defined: public System.Windows.Forms.BindingSource bsContractors; this.bsContractors.DataSource = typeof(Contractor); and then a ComboBox with a DataSource defined like so: ...
0
votes
2answers
85 views

Using a DataSource with an object in Windows Forms

I have been trying to create a small form application and I wanted to try out binding a DataGridView directly to a collection of objects. I created the following classes public class ...
0
votes
1answer
61 views

BindingNavigator events not raised

I have an "odd" situation. I've got a form with a binding source and a binding navigator. In this instance, I've got 161 records (via EF6) to display. The databinding to the controls works nicely. But ...
0
votes
1answer
39 views

C# Delete ListChanged event attached to Bindingsource

I have a bindingsource as follows: BindingSource bs = new BindingSource(dsOptions, "students"); I have added an event to it as follows: bs.ListChanged += new ListChangedEventHandler( (object sender,...
-1
votes
1answer
55 views

Datatable.getchanges - Which column changed

I have a form in detail view with a binding navigator. When i click next, if there is a change, i get asked if I want to save it. So if I know I didnt change anything and the rowstate is still ...
0
votes
0answers
28 views

Hiding datagridview rows from user only when datasource is a bindingsource?

I had a pre-existing app with a datagridview in it. For a long time, calls to read or update the dgv were made by looping through rows and pulling cell values. I decided a few weeks back that, since ...
0
votes
0answers
23 views

Table Adapter Fill by plus add new row

I have a many to many relationship between two of my tables using an intersecting table. When a user selects a record from my main table, i use that value to fill the second table using FillByID from ...
-1
votes
1answer
26 views

How can i filter more than 1 column at datagrid

I use this working code to search from textbox any partial word but just inside one column (Firstname) and return the filtered result inside DataGridView: ContactsTableBindingSource.Filter = String....
3
votes
1answer
326 views

Entity Framework: C# Winforms bindingsource delete on datagridview, but tag isDeleted field as true only (not delete)

I am currently working on a C# Winforms application with Entity Framework 5. My problem is how to do a delete (which only tag isDeleted field as true) to an item on the bindingsource binded to an ...
0
votes
0answers
32 views

DataGridView Constructor on type '' not found

I have a DataGridView in which I want to bind EF data to. It works as long as I am biding one table but as soon as I try to show a custom view it throws a Constructor on type '...' not found error. ...
0
votes
1answer
47 views

SQLite - > bindingsource, write data back

Following code does produce a system invalid operation exception on the dataAdapter_AT.Update(dT) row. I've been searching all around but cannot figure out how to write data back to the SQLite ...
1
vote
2answers
65 views

How to prevent user edits being applied to BindingSource.DataSource

Here is the scenario: I have an Edit Dialog form with a BindingSource and some data bound text boxes on it: I pass an entity to the form constructor and it gets loaded into BindingSource.DataSource ...
0
votes
0answers
41 views

Saving data set into a database adds new rows instead of updating old ones

I have created a program in which there are two data grid views on two forms, both of which are linked to the same binding source. On one of the forms one is able to import a text file that contains a ...
0
votes
1answer
75 views

Disposing the BindingSource of a ComboBox is extremely slow…

I have a main table with 4 lookup tables. All tables are bound to SQL tables accessed via stored procedures. Each lookup table has between 3 and 27 rows. The main table has about 22,000 rows (pet food ...
0
votes
1answer
72 views

Changing Row Color of DataGridView Based on Cell Value

I have Data Gridview with 2 columns namely Filename and Status .The DataGridview has a Datasource setup like this var bs = new BindingSourceAsync(); bs.DataSource = data; dataGridView4.DataSource ...
0
votes
1answer
27 views

Property for BindingSource to return alphabetically sorted list

I'm trying to create a property that returns a BindingSource in alphabetical order, here by the column "Name". Below is a shot at using Linq, which doesn't compile: 'BindingSource does not contain a ...
0
votes
0answers
47 views

Why does my bindingsource not have the methods implemented in IEditableObject, namely BeginEdit()?

I have a binding source whose underlying object implements the IEditableObject interface but Im not able to call the BeginEdit() method on the bindingsource. The EndEdit() and CancelEdit() methods are ...
0
votes
0answers
27 views

How to filter Datagridview result when set his data source to object and not to database dataset?

I create DataGridView in a form and set his data source to object, in load time I fill the biding source from a list of the same object and the datagridview show the list data, but when I want to do ...
0
votes
0answers
74 views

vb.net datagridview dataerror commit

Hello friends and happy new year! I am confused about an error in my vb.net application. I have a datagridview which is databound on a bindingsource. I have datadrigview SelectionMode to FullRowSelect....
0
votes
0answers
17 views

C# DataGridView bound to a DataTable - cell internal update works with Enter key but not Tab key?

I have a DataTable bound as a DataGridView's DataSource, and I'm using MySqlDataAdapter (let's call it da) for the connection. Filling the table via da.Fill(..) works fine. The problem is when I am ...
0
votes
0answers
25 views

Object not set to an instance of an object when bindingsource property data source [duplicate]

my English is not the best, i hope you understand me. I am trying to link a BindingSource to a domain entity but I skip that error and I do not know how to solve it, I link it through the designer in ...
1
vote
1answer
62 views

Discarding changes with a DataGridView BindingSource to EF [duplicate]

I have a little problem with my windows form app. Two forms: Parent Form - here I have DataGridView which presents list of Company. From here, I can open another form, CompanyForm, where you can add ...
0
votes
1answer
238 views

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 ...
0
votes
0answers
63 views

Combobox, BindingSource, WinForms - Adding new entry in one-to-many relation

I have company model in relation one-to-many with person model. I want to add new Person and in combobox I want to be able to select company from companies, all using bindingsource. I have PeopleForm ...
0
votes
0answers
80 views

BindingSource.Filter any character wildcard

I wanna filter my BindingSource with a column that equals to "ABC_EFG". The underscore can be replaced with just one character, Just like T-SQL syntax. How can I do that? I tried these and got no ...
0
votes
1answer
55 views

Alter Displayed Information in data-bound DataGridView

I have a datagridview that is databound. One of the columns, which is shown below, is linked to a boolean value from an object. The method to retrieve the boolean value would be "curResultSet.Pass". ...
0
votes
0answers
37 views

DataGridView.DataSource not binding three or more datagridview together

I have 3 DataGridView as follows dataGridViewTASKLIST dataGridView_USER_ROLES dataGridViewProjects These 3 grids are used for different purposes. I am trying to bind (using BindingSource) data ...
1
vote
0answers
133 views

How to change all row in a column of DataGridView?

This is an additional part inside project. The idea is to create a new Form for users to search and edit cells value in datagridview from textbox without change to database. When user is searching ...
2
votes
2answers
318 views

Binding to IList, but getting “Complex DataBinding accepts as a data source either an IList or an IListSource”

If you run the following code without debugging (or with "Enable Just My Code" active), it will seem to work. But if you start it with debugger and with "Enable Just My Code" turned off, you will get ...
1
vote
2answers
157 views

c# bindingsource filter datetime older than x days

i'm searching for a solution to filter a datagridview by a datetime field1 older than x days where x is another field2 from type short in the same row. In sql a possible syntax would be: field1 < ...
0
votes
0answers
72 views

C# Winforms: Populating DataGridView Using BindingSource

I have a long query with multiple joins and would like to access fields from all tables. I have the following ADO.NET code: private void BindData(string sql, List<SqlParameter> parameters = ...