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 > december 2005

Requery listbox bound to dataset after adding row
Posted by Jim Rand at 12/30/2005 11:03:35 PM
How do you requery a listbox bound to a dataset after manually adding a row? // Setup binding lbCustomers.DataSource = this.dsCustomerOrders1.CustomerList; lbCustomers.DisplayMember = "FullID"; lbCustomers.ValueMember = "CustomerID"; // Add row to underlying dataset System.Data.DataRow new...more >>


Refreshing ListBox View
Posted by Raju Joseph at 12/29/2005 6:24:33 PM
Hi I have a form with one listbox and couple of textbox controls. I have a custom class 'Customer' and a corresponding collection class 'CustomerCollection'. I have set the 'CustomerCollection' class as the data source for the listbox. I have bound the textbox controls to the listbox (to ...more >>

TextBox shows last row value when DataSource is refreshed with empty data table
Posted by david.beardsley NO[at]SPAM gmail.com at 12/29/2005 4:47:57 PM
I have a TextBox bound to a column of of a DataTable. When I scroll through the DataTable the TextBox updates just fine. When I refresh the data based on a new query that returns 0 rows, the TextBox still shows the value of the row from the previous DataTable. Refresh event handler looks lik...more >>

Column can not be null - what? VB .Net 2005
Posted by Jim Hope at 12/29/2005 4:02:15 PM
I am trying to add records to a table using a windows form created in vb with a dataset object. I have dragged and dropped the fields I want onto my form. A BindingNavigator is created and am trying to add a new record. I click the add button, fill out the necessary fields and attempt to updat...more >>

Object Databinding in .NET 2.0
Posted by David Veeneman at 12/28/2005 3:41:21 PM
I have been experimenting with object databinding in .NET 2.0, using Mike Weinhardt's great MSDN columns as a guide: Part 1: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnforms/html/winforms11162004.asp Part 2: http://msdn.microsoft.com/library/default.asp?url=/library...more >>

Can I bind a FlowLayoutPanel to display a control for each record?
Posted by Gabe Covert at 12/28/2005 1:59:01 PM
I've created a User Control to display data from a Dataset, and was wondering if it were possible to bind a FlowLayoutPanel so that I can display an instance of my User Control for each record in a dataset? Is there another way that I could accomplish this task? I'd prefer to use the FlowL...more >>

TableAdapter is not working
Posted by Brad Simon at 12/27/2005 10:07:18 AM
I have a windows application I am creating. It is using a local MDF / SQL Express DB as it data source. It is all .NET 2.0 (VS2005). I am new to the windows side of things on this, and I have only done a few web site with it. I looked at the TableAdapter documentation in the help file, and...more >>

CellCheckboxChanged in datagridview
Posted by Vendisoft LLC at 12/26/2005 7:14:01 AM
Which datagridview method updates the checkbox state? I have tried overriding MouseDown, MouseUp, MouseClick, and in each one the Displayed cell value remains the same before and after the base method is called... Or maybe there is a better way to get instant checkbox changed feedback? ins...more >>



parent-child datagrid ... how to determine if child is shown?
Posted by George Hardy at 12/22/2005 5:13:48 PM
Hi all, I have parent/child datagrid (showing transactions and transaction details when the (+) sign is clicked on the grid. There is a method to "expand" the row, and an event to fire when you click "back to parent record", but i see nothing (no property or event) in this stupid grid to...more >>

drop down problem
Posted by Shannon Ramirez at 12/22/2005 9:25:02 AM
I have two datasource's bound to objects. I'm using one of the datasources (PermCampers) to fill a detail information that I drug to the winform. In that PermCampers is a property called WeekId that I have made into a combobox.before I drug that datasource to the form. Now on that weekid c...more >>

UserControl with internal BindingSource doesn't work
Posted by theftum at 12/22/2005 3:52:02 AM
Hi, Can anyone help with the following problem, it is with BindingSource in .net 2.0? This is probably to do with the way that I am trying to set things up, but I have created a UserControl called SqlTable, which contains a panel for the name of the table, and a listbox for the fields i...more >>

What is the event for Item Update?
Posted by amolkasbekar NO[at]SPAM gmail.com at 12/21/2005 11:43:47 PM
I am building a custom data binding control that derives from BindingList<of T> and provides transparent persistence mechanism of the objects to the database like a datatable. To do this I override the appropriate events in my custom control class. e.g. adding object to the datagridview adds it...more >>

Databound Checkbox problems with Bindingcontext.addnew()
Posted by Guy k at 12/21/2005 3:25:03 AM
I've got a dataset and a windows form I've bound my controls too. I have two fields that are True/False in the SQL server and wanted to use checkboxes for those... Everything looks fine, you can navigate through existing records, etc, right up until you try to add a new record: this.BindingCo...more >>

VS 2005 toolbox
Posted by Who at 12/20/2005 6:02:47 PM
How do I save the appearance of the toolbox for future projects? Is there anyway to save the appearance of the total workspace? MBS ...more >>

bindingsource.filter question
Posted by Shannon Ramirez at 12/20/2005 9:21:53 AM
I'm uisng a custom class to fuel my datasouce. I've draged the datasource over in detail view and put in the Me.CampersBindingSource.DataSource = oCampers the data appears fine. now what I'm trying to figure out is how to wire the textbox in the binding navigor toolstrip so that when...more >>

binding does not work if control is not displayed
Posted by rushabh_subscriptions NO[at]SPAM dadbhawala.in at 12/19/2005 7:35:40 PM
Suppose: * I have a class Name with two properties: FirstName, LastName. Both string. * I have a form with one TabControl with 2 TabPages, with one TextBox on each TabPage. * I bind an instance of the Name class on the Form's Load event. For each Binding object (one for each TextBox), I ...more >>

Binding many controls to same DataSource using different Position
Posted by Rob van Gelder at 12/19/2005 12:17:02 PM
Hi. I'm fairly new at C# and .NET Framework. I'd really appreciate your advice. I'm using 2.0. I would like to have many read-only controls on my form, each using a different portion of data from my data source. I have a Class (called MyClass) containing a Property named DisplayValue. ...more >>

DataView Current Position
Posted by Mark Atkinson at 12/19/2005 11:39:02 AM
I understand how to get the current row, position, etc from a DataView given that it may be bound to a WinForms control and using BindingManagerBase/CurrencyManager, but what if you have a Dataview class independant of any technological platform? I'd like to be able to get and set some kind o...more >>

VS 2005 Datasource
Posted by JDF at 12/19/2005 9:18:51 AM
2 questions 1.) When inserting a new datasource in VB 2005 the tables are listed in the Datesources window with an icon showing a circle with a line through it. Why doesn't VB assign a default data control type to each table. (Datagrid, Details, etc.) 2.) I create a simple database appli...more >>

simple Dataset Question
Posted by mf_sina at 12/16/2005 9:07:04 PM
Hi all!! I have a MS access database (Customers.mdb) and a table in it (TblCustomers). the table has these fields: Cust_ID, Cust_Name , Cust_City , Cust_State on my form i have an oleDBdataconnection (DC1) and an oledbdataadapter (DA1). now hoc can i programatically create a dataset (DS...more >>

DataColumn in DataGridView visible even it's false?
Posted by Oka Morikawa at 12/15/2005 6:58:35 PM
I have DataGridView where I have DataColumn and it's Visible property is False but still it shows it in DataGridView? On some other form it works as supposed but on some forms it doesn't. Is this known bug in form designer generated code? Regards, Oka Morikawa D I G I N E ...more >>

CurrencyManager calls IEditableObject without checking IBindingList.AllowEdits
Posted by aaron at 12/15/2005 2:20:05 AM
I've been working with a custom data source and implementing IBindingList, ITypedList on the collection object; and for the item in the collection IEditableObject and IDataErrorInfo. In the UI for this the data source is presented in a grid, and other areas of the screen allow editing of the i...more >>

binding source addnewitem question
Posted by Shannon Ramirez at 12/13/2005 2:24:47 PM
I have a datasource that is bound to a class i created. I changed the datasource so that it woudl be using the detail view, not the datagrid and drug it over.. below is what I'm using to bind the class to the bindingsource With oCampers ..LoadFromDB() oCampers = .Load("") 'load all ...more >>

multiline TextBox Control
Posted by Lord_Andrew6 at 12/13/2005 8:56:31 AM
Hallo, I realy need help! I just started programming with .Net Windows Forms, and i tried to bind a System.String [] to a multiline TextBox to display all elements of the array at once!! I always got the same result. The first element of the array gets displayed and the other not! Why ?? Is i...more >>

Am I just being thick? XML file - 2 way Data Binding +Encryption
Posted by Chad A. Beckner at 12/12/2005 8:42:45 PM
Hi, I am developing an application and need to make it so the application data is stored in some manner. I am thinking of an XML file as the data source. I would like to setup 2 way data binding & also make it so the xml file is encrypted. I'm using .NET 2.0. Thanks! Chad ...more >>

Need lightweight custom windows grid
Posted by Rajat at 12/12/2005 3:14:19 PM
Hi, I am receiving data from an external source in form of events. The incoming events are very fast. Initially I was using windows datagrid control to display the data, but it seems to be very slow. Please tell me, how can I create my own custom lightweight grid to solve this issue or poin...more >>

CurrencyManager based control
Posted by Sven Kuenzler at 12/10/2005 5:27:09 PM
I am writing a navigation control which is bound to a dataset using CurrencyManager. -- code snippet class MyControl : UserControl { CurrencyManager listManager; object dataSource; string dataMember; void BindDataSource() { if(dataMember != null) listManager = (CurrencyMan...more >>

EndCUrrentEdit and DataRowState.Modified
Posted by Aurin at 12/9/2005 2:54:02 PM
I am Running .NET Framework 1.1.43322 SP1 I have a Windows Form with a tab control and several tab pages and a Save tool bar item. If the user tries to close the form without saving his changes to the database I want to prompt him “Do you want to Save?” All user-entered updates are en...more >>

Problem with Deleting record from databound list control
Posted by S. Shawn Mehaffie at 12/9/2005 1:41:45 PM
I get the following error when I try to remove an item from a list control and the update the ds it is bound to. "Concurrency violation: the DeleteCommand affected 0 of the expected 1 records." Code being used. lstControl.RemoverCurrentItem(); lstControl.EndEdit; TableAdapter.Update()...more >>

Setting the control's property
Posted by Alan Baljeu at 12/9/2005 11:28:34 AM
I have textBoxColor bound to myBoundObject.Color, and it works for two scenarios: If I type in the box, the Color property gets set as soon as I tab out. If I set the Color property, the text gets put in the textbox. But the following code does not work: void UponClick() { textBoxColo...more >>

How to display Real-Time Data?
Posted by wrytat at 12/8/2005 5:10:02 PM
I'm writing a windows application that requires to display real-time data all the time. Can anyone give me some guidance? Thank you....more >>

ComboBox Add Items
Posted by ZWeng at 12/8/2005 2:14:02 PM
Hi, I am working on a winform project to populate a few comboBoxes with Keys differ from the Values. In Framework 1.x, I can do ComboBox.Items.Add(new ListItem("Value","Key" )) But in the VS2005 of framework 2.0, the only close option is new ListViewItem("Value", "Key"). And when this ...more >>

DataGridView / Generics
Posted by BJF at 12/3/2005 8:39:51 AM
If some would help - I'm trying to use a List<MyClass> collection as the datasource for a DataGridView in a Windows form, and I can't find good enough instructions. I'll be happy with either some 'how-to' steps, or a point at the right documentation. I've gotten as far as creating my class,...more >>

BindingSource or CurrencyManager
Posted by michael at 12/3/2005 6:32:02 AM
I do all of my databinding at run time. I've always used the CurrencyManager. Now I see a new object, the BindingSource which seems to have the same functionality. Can the BindingSource be used the same way the CurrencyManager is used at runtime or is it more for the Designer? Is the Bin...more >>

Sava data from simple editor objects
Posted by Baranyi Peter at 12/2/2005 5:11:38 PM
Hi, I created a form with I want to update the content of a DB table. I placed some databinded editor objects: text boxes, combo boxes, etc on it: they show one database record. I overwrite the value in the edit box, and I want to save the modifyed data back to the DB. However I don't know...more >>

Combobox and databinding
Posted by Per Johansson at 12/2/2005 3:47:58 PM
I have bound a Visual Basic.net Combobox to a Datatable like this: Me.ComboBox1.DataBindings.Add(New Binding("SelectedItem", Me.VehicleDataSet1, "Vehicle.Name")) Me.ComboBox1.DataBindings.Add(New Binding("SelectedValue", Me.VehicleDataSet1, "Vehicle.VehicleID")) Me.ComboBox1.DataSource = Me...more >>

ArrayList & dropdowns .Net 2.0
Posted by Stephen at 12/2/2005 7:02:00 AM
I am trying to populate a drop down from an array. Here is my class: namespace InstallChecklist { interface IListSource {} class checklistLists : IListSource { public class listItems { private int _listValue; private string _listText;...more >>

Best single documentation source for Binding
Posted by michael at 12/1/2005 12:30:03 PM
Where's the best single source for a description of binding, from BindingContext through CurrencyManager. The help files are useful but lack a lot of the 'need to know' details. There has to be a good chapter or white paper somewhere. I need to know things like: If you NameOfControl.DataBin...more >>


DevelopmentNow Blog