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 > january 2007

BindingNavigator How do i disable the delete on a per record basis
Posted by Paul Say at 1/31/2007 2:22:31 PM
I have a BindingNavigator, BindingSource (Custom Object) and a DataGridView. What i want to do is disable the delete button on the BindingNavigator based on the value of a particular field within the selected row of the DataGridView Any ideas appreciated Thanks Paul ...more >>


DataGridView and ComboBoxColumn
Posted by Brian Pelton at 1/30/2007 2:13:34 PM
This is on .Net 2.0 in a WinForms application. I have a DataGridView that is bound to a BindingSource. The DataGridView has 3 columns. The first two are "normal" text columns and the last is a combo box column. Data binding is working fine for the first two columns. I am able to edi...more >>

should be really simple databinding queston
Posted by hawbsys at 1/30/2007 8:52:48 AM
Dear all. I'm wondering why it's so hard to bind a lookup value from a related table into a textbox on my form. Say I've got two tables, product and productcategory. I'm paging through product information using the bindingnavigator, one product per page. Everything on the form is bound to f...more >>

How to determine if a form IsDirty
Posted by Jim Rand at 1/29/2007 5:12:29 PM
Let's say you have a form with a bunch of text boxes bound to a binding source. The form also has a "Save" button which you want enabled only if the user has made changes. The Save button will call bindingSource.EndEdit() and will then instruct the dataset to update the database. Other ...more >>

Is cell[index] the only way to get row data?
Posted by Beemer Biker at 1/29/2007 10:10:01 AM
It is awkard to code up the following: double dFreq = Convert.ToDouble(dataGridView1.Rows[CurrentFrequency].Cells[freqDataGridViewTextBoxColumn.Index].Value); It seems to me (comeing from CBuilder6) that I should be able to specify the selected row as in dataGridView1.Rows[CurrentFreq...more >>

threads: datagridvew works but not textboxes, etc?
Posted by Beemer Biker at 1/29/2007 9:58:39 AM
New to threading in C#, I discovered I needed a delegation mechanism to update a textbox (for example) from a timer thread. However, the timer thread seems to have no problem getting data from my datagridview nor "selecting" a row nor updating an unbound value on that grid. Did I luck out ...more >>

databind cells within a column to different properties
Posted by Patrik at 1/25/2007 9:23:57 AM
I need to populate a table with a list of paramaters comming from a business object as properties. I do not want the normal dataview were a property is represented by a column. Instead I would like for example two columns. The first shall contain the names of the parameters and the second colu...more >>

INotifyPropertyChanged Bug ?
Posted by John Greenwood at 1/24/2007 7:15:00 AM
Hi, I'm not sure if i'm misunderstanding how INotifyPropertyChanged should work but it's not working as I expected. I have a sample program with a very simple 'Customer' class with three properties code, name & address. All these are bound to a form via a BindingSource and fire the Propert...more >>



Data Grid Behavior with Normal Controls
Posted by Brian Pelton at 1/22/2007 8:36:05 AM
Is there a way to get the data grid behavior of working with multiple rows, but use conventional controls like text boxes and combo boxes? Let's say I have form that is used for orders. Each order can have multiple lines, but I don't want to use a datagrid for order lines. I would rather ...more >>

Typical datetimepicker problems
Posted by Rock3 at 1/21/2007 7:46:02 PM
Trying to bind datetimepicker to bindingsource I face 2 problems: 1) The typical problem - I can't bind to nulls. Summing up, what is the easiest way to allow datetimepicker to be bound to null? 2) This thing is about date formats in which datetimepicker stores dates. In sql server from where ...more >>

Databinding multiple datagridview's on a single form
Posted by Real_Foggy at 1/20/2007 5:02:54 PM
Hello All, Just starting out with VB2005 using SQL2005 Express, I hope that someone may be able to help me, I have created a windows application and have created a connection to the sql database (Northwind) and added the required tables to the data sources using the wizard, I have dragged th...more >>

Databinding on a combobox
Posted by Dirk at 1/16/2007 7:07:42 AM
Hello, I use a business layer which I wan=B4t to bind to Windows Forms controls. I make heavy use of interfaces, I now I have a problem: I attached a sample Project to show the problem: When you test this little application, you will see the the databinding of comboBox1 will work fine (th...more >>

Designer creating duplicate DataRelation
Posted by Glenn at 1/15/2007 2:43:25 PM
Hi I've created a typed DataSet called MembershipDataSet. MembershipDataSet contains a baked-in DataRelation between two tables which gets created in the constructor and added to the base class DataRelationCollection. In VS forms I drag the MembershipDataSet component onto the form. Then...more >>

BindingContext and components
Posted by Richard at 1/15/2007 2:29:15 PM
Hello, I'm trying to write a component that has a DataSource and DataMember property much like the DataGridView. I want to use the CurrencyManager so I need to access the BindingContext of the form. But how can I do this? If I wrote a control, I could just do Parent.BindingContext[dataSourc...more >>

Newbie Missing Something with Access DB Update Using VB .NET
Posted by pooba53 at 1/15/2007 9:49:45 AM
I have a VB .NET application that is communicating properly with an Access DB. I have a slew of textbox controls bound to a dataset and when the application launches, the fields are correctly populated. If someone changes a value in one of the text boxes, I need to have a button capture the ch...more >>

vs2003 to vs2005
Posted by John at 1/14/2007 8:33:31 PM
Hi I have a vb.net 2003 database winform app which uses non-bound controls and the associated plumbing is done in code. If I move it to vs 2005 would it work without any change? Thanks Regards ...more >>

VS 2005 SP1
Posted by John at 1/14/2007 6:53:48 PM
Hi I am almost finished with a vs 2005 (pre sp1) project which I need to deliver in the next couple of days. I am wondering if I should deliver project with sp1. Is it safe to install sp1 at this late stage? Thanks Regards ...more >>

Binding different ComboBoxes to same Table
Posted by d-e-j-a-v-u NO[at]SPAM web.de at 1/12/2007 6:20:50 PM
Hi everybody, I have a configuration with popups, that look something like this: CREATE TABLE TrafficSign( ID NUMBER, LocationInfo TEXT, Quality_Day NUMBER, Quality_Night NUMBER ... ) CREATE TABLE QualityValues( ID NUMBER, ...more >>

unable to drag and drop data source to form...
Posted by Brad Pears at 1/11/2007 5:25:19 PM
I am new to vb.net 2005. I am simpyl trying to drag a table to a form. I created a new SQL Server 2000 database and ONE table on our SQL server test machine. Then in my project I went to data sources and added a new datasource - which points to the server, database and table I want. The con...more >>

How do I reference the DataView a DataGridView is bound to?
Posted by Roger at 1/11/2007 8:43:01 AM
Hello. I have a DataGridView that is bound to a BindingSource that was created using the Data Sources designer in VS2005. Typically, I create a DataView in code and bind it to the grid manually, but I'm trying to do this through the designers for a change. I'm assuming that the grid is actually ...more >>

binding data to a combobox with a filter - C#
Posted by joel at 1/10/2007 1:56:05 AM
hi 1. I use the following code to bind the Roles data table to the datagrid RolesGrid with a filter that removes rows whose IsInstalled property is true. System.Data.DataViewManager rolesViewManager = new DataViewManager(dataset11); rolesViewManager.DataViewSettings["Roles"].RowFilter = "I...more >>

Updating new row in DataGridView
Posted by Curt Gough at 1/8/2007 3:34:09 PM
I am having some trouble with updating/inserting data through a databound DataGridView. I call the TableAdapter.Update method on the RowLeave event. When the user tabs out of the row to the new row, the update occurs correctly. What I want to do is fire the update whenever the user leaves the ...more >>

Binding to textbox question
Posted by Benson Wong at 1/7/2007 10:23:43 PM
I use dataAdapter to select a record from table (eg. CustomerTable). I have a textbox on the form. I try to bind the field (CustomerID) to the textbox. Question: I know the following is worked: DataGridView1.DataSource = TableOneBindingSource CustomerIDTextBox.DataBindings.Add("Text", T...more >>

The Infamous DateTimePicker
Posted by Earl at 1/7/2007 10:30:29 AM
I have what I consider to be an unusual issue. In the past, I've not used data-binding with the DTPs. So I'm finding some of the old issues raising their ugly heads in a new fashion. First a caveat: All other controls and data work properly on this form. Updates, deletes, inserts, all as ad...more >>

Textbox bound to custom property shows 0 when value is nothing
Posted by segecko NO[at]SPAM gmail.com at 1/5/2007 5:46:56 AM
Hi I have this rather simple problem. I have created a class which implements INotifyPropertyChanged. This class has a public property (of type long) which is bound to a standard textbox using a BindingSource object as broker. This works fine, except when the underlying value is Nothing, the ...more >>


DevelopmentNow Blog