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 > may 2006

Losing columns when changing DataSource
Posted by Jeff Johnson at 5/31/2006 5:04:01 PM
I'm giving .NET data binding a chance before I dismiss it as I did with data binding in VB6, but I'm having some problems. Background: I am binding to a List(Of T) where T is a custom class I have written. At first I just set DataSource equal to my list and, while it worked, the columns wer...more >>

DataGridView - BindingSource: How can i do a refresh?
Posted by rancidpunx NO[at]SPAM gmx.at at 5/31/2006 1:58:53 AM
Hi! I have following problem: I'm using a DataGridView, which is connected to a DataSet via a BindingSource (that's because I'm also using a bindingNavigator for this one), and basically this whole thing works fine, except one thing: If the DataSet - which is connected to the BindingSourc...more >>

Reflecting on a Generic Type
Posted by JT at 5/30/2006 2:36:02 PM
I am trying to set up a datagrid combobox column to get the display member given the value member when the datasource is a BindingList(Of T). I expanded on a MS example for the BindingList, and am attempting to use reflection to get a property value from the instance that represents the type ...more >>

displaying generated field and binding to an acutal field
Posted by Gus M at 5/28/2006 5:41:30 PM
Hi, I've got a small problem I can't find an answer to. I need to be able to display multiple items in a combobox from a SQL generated field (such as (SELECT RTRIM(per_surname) + ', ' + RTRIM(per_first_name) AS company_manager) and bind to the com_manager_per_id field (a FK to per_first_n...more >>

DataTable.Column.DefaultValue ??
Posted by Mark at 5/25/2006 5:01:27 PM
Hi, I have a DataTable in my DataSet with a "datetime" Column. I can specify a DefaultValue for this Column using a String such as "01/01/2006" etc but can I set it to default to today? Something like ".DefaultValue = DateTime.Today" but do this in the designer and not in code (if I did ...more >>

combobox datasource
Posted by Alejandro González at 5/25/2006 3:48:13 PM
Hi I have a combobox binded to a Datatable something like combo.DataSource = dt.DefaultView; combo.DisplayMember = "descField"; combo.ValueMember = "valueField"; it works fine. Now if I update the datatable I want the combo to reflect those changes. I'm trying to rebind the combo doi...more >>

Data bind to web service...
Posted by William Buchanan at 5/24/2006 10:26:51 PM
Hi folks I have a web service which returns a data table through a web method. I also have a win form with a combo box. The combo box is linked to a binding source - the binding source is linked to the web service. However, when I open the form there is no data in the combo box. What am...more >>

Binding Lost?
Posted by Özden Irmak at 5/24/2006 9:40:07 PM
Hello, I wrote a custom control which has a textbox inside it and it has a value property which is bindable to a datasource. In my sample screen, I have a datagrid and a bunch of my custom control. I bind them to the same datasource so when the user moves in the rows of the grid, my cust...more >>



ComboBox value as parameter for stored procedure?
Posted by Daniel Manes at 5/24/2006 12:07:28 PM
Ok, I have a DataGridView, and I want to fill it with data from a stored procedure (which is on a SQL server express database). This procedure requires a parameter called "Country." The user selects the country from a ComboBox elsewhere on the form. All seems to be working fine except one thin...more >>

[DataGrid, adding multiple Rows to DataTable] How to speed up the process?
Posted by Pascalus at 5/23/2006 7:10:47 PM
Hi there! Adding thousands (let's say 100'000) of rows to a DataSet->DataTable in the way (C++ style): DataTable *table = dataset->Tables->Item[S"MyTable"]; table->Clear(); for(int i=0; i<num; i++) { DataRow *newRow = table->NewRow(); newRow->Item["Column1"] = something; newRow->Item...more >>

Who is bound ? Wich controls are bound
Posted by andre mens at 5/21/2006 12:00:00 AM
Hi is it possible to see wich controls are bound to a dataset ? For example is it possible to see that a TextBox is bound to a field in a datatable of a dataset ? And i only know of the existense of the DataTable / DataSet Greetings Andre Mens ...more >>

Adjusting Column width of datagrid in VB.Net
Posted by Dili at 5/19/2006 11:23:16 PM
Hi I want to adjust the Column width of a datagrid in VB.Net I tried all that tablestyle, columnstyle etc. But changing the 'PreferedColumnWidth' of these properties doesn't work.When I used 'Datagrid1.PreferedcolumnWidth=125' then it affects all columns in the grid.I want to change their wid...more >>

newbie -- datagrid not automatically committing edits and inserts
Posted by Freddy at 5/18/2006 12:04:36 PM
Hi, Using VS 2005 and Sql Server 2005. I've created a datagrid using the wizard, and told it to generate insert and update statements. the datagrid displays the data nicely, i can edit cells, and add new rows. but these changes do not get posted to the actual database. there must be some...more >>

Simple database to comboBox data bind
Posted by emorgoch.public NO[at]SPAM gmail.com at 5/17/2006 10:40:26 AM
Hello there, Still kind of new to .NET , and have been looking online for many hours now on doing this. All I want to do is take a couple columns from a view in a database, and bind it to a combo box. What's the simplest method to do this, cause what I've been seeing so far all seems to get p...more >>

When does a DataSource get updated?
Posted by David at 5/14/2006 2:59:46 PM
I have a form with a checkbox that is bound to a System.Boolean field in a data table. I also have a handler for the DataRowChange event. When I check or uncheck the checkbox the DataRowChange handler is not called. If I call EndCurrentEdit() the handler also does not fire. However, if I ...more >>

Bind Datagrid to Relation via Dataview
Posted by ccshine via DotNetMonster.com at 5/11/2006 10:08:37 PM
After searching throughout this and other sites trying variations on my code to no avail, I confess. I was the second gunman on the grassy knoll! And my eyes are about to bug out of my head trying to find a solution to this issue so any help would be greatly appreciated. I have a datagrid ...more >>

Deep DataBinding BindingSource
Posted by Andreas Rudischhauser at 5/11/2006 4:41:29 PM
As I debugged, all bound controls will first query the BindingSource.Count Property and then retrieve all data via BindingSource[index] Property. My Problem is that I do not want the GridView to fetch all data when its displayed. It should only request the data it can actually draw into the ...more >>

App Hang with BackgroundWorker
Posted by JT at 5/10/2006 10:53:02 PM
HI, I am upgrading a Windows Forms app to ADO.NET 2.0 from 1.1. I tried using a background worker to load my dataset for a particular form in a separate thread, being careful not to try to update the UI from this thread. The form loads and works well, but hangs when I hit the close button. ...more >>

Databinding problem ?
Posted by andre mens at 5/10/2006 10:38:22 PM
Hi I'm having some difficulties understanding the databindings. I have a bindingsource on a form wich reads a dataset from the DB on the form i have a record view and a datagridview dropped on it from the datasources. when i add a new record and enter the values in the record edits the g...more >>

How Do I Pass Bindingsource to Another Winform.
Posted by Rob Dob at 5/5/2006 4:21:00 PM
Hi, I have two c# Winforms. the first form has a datagridview who's datasource is a bindingsource. when you double click on a datagridview row it then opens my second form, which has some databound controls, text boxes that are bound to another bindingsource. Both bindingsources are bound...more >>

How Do I Pass Bindingsource to Another form.
Posted by Rob Dob at 5/5/2006 11:57:58 AM
Hi, I have two forms. the first form has a datagridview who's datasource is a bindingsource. when you double click on a datagridview row it then opens my second form, which has some databound controls, text boxes that are bound to another bindingsource. Both bindingsources are bound to t...more >>

Combining two fields in a textbox
Posted by Lefteris Kororos at 5/4/2006 7:30:24 AM
Hi, is there a way to bind a textbox in such a way so that its text is a concatination of two fields from a dataset? To be more specific, I need to have a textbox with Full Name, but in the database I have a field for First Name and a field for Last Name. Thanks in advance, Lefteris ...more >>

Problems updating underlying Access database using DataSet
Posted by lkororos NO[at]SPAM gmail.com at 5/3/2006 5:35:32 PM
Hi, here is my problem: I am writing a form to make some changes in the details of some employees. I use a combobox to select the Social Security Number and retrieve the details of a specific employee. So far so good. The details are retrieved ok. I use the BondingContext.Position = cmbBox...more >>

Override ApplySortCore ???
Posted by Jakob Lithner at 5/2/2006 1:51:02 AM
I have a custom collection that inherits from BindingList. I bind it to a WinForms DataGridView and want to provide sorting by clicking the column headers. It does not work right away and I found out it is because the collection does not support Sorting in itself. I read that I need to overr...more >>


DevelopmentNow Blog