Archived Months
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008
May 2008
June 2008
all groups > dotnet windows forms databinding > april 2006

Adding a child table row to the underlying dataset is throwing an error. Need some HELP.
Posted by Hexman at 4/29/2006 2:54:36 AM
Hi All, I've taken a few steps forward on my project, but got caught by another problem I can't figure out. Some help is needed please. Please read the history of this app. The application is now working fine,... EXCEPT when I go to add a child row. It fails on the "TableAdapter2.Update...more >>


BindingSource.Filter fails when datasource derives from List(Of T)
Posted by Sacha Vieux-Roy at 4/28/2006 4:03:02 AM
I created a custom collection that derives from System.Collections.Generic.List(Of Person) and populated it with 5 person objects. I bound a Gridview to the BindingSource object. I set the Datasource property of the bindingsource object to my custom collection. I then set the filter property...more >>

Changing Combobox from DropDown to DropDownList
Posted by mbaril68 NO[at]SPAM hotmail.com at 4/27/2006 11:37:10 AM
Why does my field not save when I change the combobox from DropDown to DropDownList? I used the data from wizard. Thanks. ...more >>

combobox binding
Posted by Fanor at 4/27/2006 10:21:47 AM
I have a combo box bound to a binding source wich is bound to a table. For some reason the selectedvalue of the combo box doesn't show the correctt value of the row the first time the form is showed. When I move to the next row using a binding navigator the combobox selectedvalue have the corr...more >>

Simple DataRelation not working between 2 DataGridViews - Help
Posted by Hexman at 4/26/2006 10:14:09 PM
Hi All, I even started off with a new project and a blank form. In design view I created a DataSet, 2 tables within the DataSet, 2 TableAdapters, and 2 BindingSources. One tableadapter and one BindingSource for each table. The tables have the following key structure: Table1 PK t1Date ...more >>

Get the selected value from a combo box in .Net 2.0
Posted by Natraj at 4/25/2006 7:33:15 PM
Hi All, I am developing the windows application using .Net 2.0. I am binding the dataset to the combo box like, this.statesCB.DisplayMember = "Name"; this.statesCB.ValueMember = "Code"; t...more >>

Get the selected value from a combo box in .Net 2.0
Posted by Natraj at 4/25/2006 7:30:56 PM
Hi All, I am developing the windows application using .Net 2.0. I am binding the dataset to the combo box like, this.statesCB.DisplayMember = "Name"; this.statesCB.ValueMember = "Code"; t...more >>

Get object which DataGridView row is bound to
Posted by moondaddy at 4/24/2006 1:44:18 PM
VS 2005 winforms project: I have a DataGridView bound to a list of business objects. On it's RowEnter event I want to get a reference to the business object that row of the DataGridView is bound to. How can this be done? // Persons_BLL obj // obj is an instance of Persons_BLL // H...more >>



Databind to a single instance of a class
Posted by moondaddy at 4/24/2006 1:43:51 PM
I've seen plenty of examples where you can databind to a list of objects, but in this case I want to bind to a single instance and have no use for a list. Can anyone refer a good example of how to do this in .net 2.0? Thanks. -- moondaddy@noemail.noemail ...more >>

Bind toolstrip buttons to props in a class
Posted by moondaddy at 4/24/2006 1:43:13 PM
I have a c# 2.0 app and want to bind the buttons on a toolstrip to properties in a class which will manage the state of these buttons. How can this be done? Thanks. -- moondaddy@noemail.noemail ...more >>

Multiple fields as displaymember (combobox or listbox)
Posted by Sergio Torres at 4/24/2006 6:12:02 AM
I need to populate a combobox and/or a listbox with several fields as displaymember. Both controls allow only one field as displaymember. I need the display member to look like this (the columns should be left aligned), where each columns represents a field in the underlying datatable: 001...more >>

Silly OutOfMemoryException thrown from databound ComboBox...
Posted by Nathan Baulch at 4/24/2006 12:00:00 AM
I just waisted so much time on the following issue that I decided to = post it to the groups for permanent reference for anybody else who comes = across it. When databinding a DropDownList ComboBox to a list of business objects = via a BindingSource, make sure that if you've overridden ToStrin...more >>

how to copy data fom a gridview to another.
Posted by wu jianhua at 4/23/2006 12:00:00 AM
hi, I have 2 DataGridViews( gridSrc, gridDst), their datatable(DataSource) have same columns. DataGridViewRow srcrow = gridSrc.CurrentRow; How to insert srcrow into gridDst? thanks. wu jianhua. ...more >>

DataGridView & Different Data Types (Exception)
Posted by rob at 4/18/2006 10:07:22 PM
For a DataGridView column representing float values how can I set a cell to a non-float value (empty cell or the string "N/A") for float values that are (logically) invalid while maintaining data synchronization? Bellow is a scenario in case my question isn't clear. I have a class with differe...more >>

DataGrid, with editable fields in form
Posted by Joe Spears at 4/17/2006 1:18:38 PM
Hi I want to display a datagrid summary of a datatable. The grid will not show all the fields, but when the user selects a row, I want the other controls (text boxes) to also bind to the same row that is selected in the grid. However, the controls will bind to ALL of the fields, where the gr...more >>

Editing DataGridView Cell Always Reverts
Posted by rob at 4/17/2006 12:40:55 AM
I have a BindingSource whose DataSource property is set to a list of structs (List<MyStruct>). Each property in MyStruct can be read and writen (get/set). I also have a DataGridView to which I manually add columns (dataGridView.Columns.Add). Each column has set the property "ReadOnly" to fals...more >>

why not show in grid & textbox synchronous
Posted by wu jianhua at 4/15/2006 6:16:06 PM
hi, I use .net 2003, In form I have a grid and some textboxs. DataView view = ...... grid.DatSource = view; and add binding for textBox, like : TxtCode.DataBindings.Add( "Text", view.Table, "cust_code" ); TxtName.DataBindings.Add( "Text", view.Table, "cust_name" ); when I scroll my grid, text...more >>

Databinding through a class
Posted by Rick Mogstad at 4/12/2006 9:35:02 AM
I need to be able to keep track of many properties about a field on my form that the dataset cannot keep track of, so I would like to use a class to keep track of these, while still taking advantage of databinding. In essence, I would like to bind the Value property of my class to a column ...more >>

BindingSource and DAL classes (Visual Studio 2005)
Posted by Piotrek at 4/10/2006 12:06:37 PM
Hi all. I am writing a Windows Forms Application. I have SessionDAL class (Data Access Layer), which has such method: public DataTable GetSessionsContent(Nullable<int> sessionId, out int retcode, out string retmsg) { ... } This method connects to the database, retrieves proper data and...more >>

AddNew row event help
Posted by mr_doles at 4/9/2006 9:38:52 AM
I have a form with a few fields (textboxes, comboboxes, etc), a dataset, a bindingsource, a table adapter, and a bindingnavagator on it. I am trying to understand the way the updates happen to deal with the add new error. If I add a new row and then try to move to another row or perform a fi...more >>

DataGridView Column Header Click Selection Problem
Posted by ChimaysDad at 4/7/2006 6:34:02 AM
I’m using VB.Net 2005 and dgv in a Windows Forms App to present MSSQL 2000 Table Data for display only and not updating, allow User to be able to Sort and to enable User navigation based on clicking any Row. I just can’t get all the Properties, Events and Methods to give me my druthers:...more >>

DataGridView with different ComboBox items in each row
Posted by jens.ro at 4/6/2006 10:58:22 AM
I have a DataGridView with three columns. The first two columns contain ComboBoxes, the third column contains textboxes. The ComboBoxes of the first column always have the same list of items, but in the second column, the items depend on the selection of the cell in the first column (so for each...more >>

DataGridView and custom collection databinding
Posted by Liviu Uba at 4/6/2006 12:00:00 AM
I have a BindingList<T> which is bound to a DataGridView. The class used in the BindingList implements IEditableObject, INotifyPropertyChanged. I use a BindingSource to expose the collection to a grid and a property of the current object to a textbox. My problem is that if I am on the new ...more >>

TableAdapter do not generate update and delete commands
Posted by joeblast at 4/5/2006 6:16:02 PM
I follow the wizard in the designer and I get a "generated updata methods" success message but when I go back to the TableAdapter only the Insert and Select methods are created ...... The select is very simple: select col1 from table1 Any idea?...more >>

Long running transaction
Posted by amoltavkar NO[at]SPAM gmail.com at 4/5/2006 6:33:53 AM
Hi, I have a situation wherein I need to fetch a huge amount of data (2-3 million records) from SQL server database into a dataset, loop through the entire data, do some data processing and then commit the entire transaction to the database. The above operation will be done by a process sch...more >>

TableAdapters ...
Posted by Liz at 4/4/2006 3:18:40 PM
Hi .... If I use the TableAdapter Configuration wizard to automatically generate INSERT, DELETE and UPDATE code in a DataSet and then drop a data source on a DataGridView do I have to handle row adds and changes myself or are they wired up "automatically" ? It does not appear that they a...more >>

Object Data Source Edit in Gridview
Posted by Martin Stave at 4/3/2006 11:57:14 PM
Hi there, I am trying to use a strongly typed BusinessObject Data Source with a GridView on an asp page. By using the same example that was given on MSDN Walkthrough: "Using a Business Object Data Source with the ReportViewer Web Server Control in Local Processing Mode" http://msdn2.micros...more >>

Sharing one BindingSource.
Posted by Dan at 4/3/2006 9:44:03 AM
What i would like to do is share on datasource with many forms, controls and etc. but i having a problem, the binding only updates the targets when the position of the datasource is changed (you will understand that after you see the code below). so if change the description textbox the othe...more >>

Allow user to add/del rows not possible with data bound DataGridView
Posted by jens.ro at 4/2/2006 12:53:30 AM
Hello, I have a DataGridView control that I bound to an array of objects. This works fine but now the properties AllowUserToAddRows and AllowUserToRemoveRows have no effect anymore, which means no empty row for adding new rows is displayed and pressing Del on an existing row does not delete t...more >>


DevelopmentNow Blog