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


all groups > dotnet windows forms databinding > september 2006

Databinding an array of enum types to a DataGridViewComboBoxColumn
Posted by Haxan at 9/29/2006 5:30:01 PM
Hi, I have a DataGridView which contains a column of type DataGridViewComboBoxColumn. Im trying to bind the DataGridViewComboBoxColumn to an array of enums. The following is how my enums look enum myEnum { enumA, enumB, enumC, enumD } My array contains elements of type ...more >>

FormViewInsertedEventArgs.AffectedRows is always -1
Posted by Baldie at 9/29/2006 7:58:02 AM
I'm using a form view together with a ObjectDataSource. In the FormViewItemInserted event I check if (1 == e.AffectedRows) e being of type FormViewInsertedEventArgs AffectedRows is always -1. No excption (e.Exception == null) is thrown and the record is added to the database correctly....more >>

Add DataGridViewComboBoxColumn to DataGridView Error
Posted by Johan Machielse at 9/28/2006 7:31:02 AM
Dear Reader, I have a DataGridView control on my form and when it's shown, the following error is shown: "System.ArgumentException: DataGridViewComboBoxCell value is not valid." The DataGridView's datasource is set using the following code: *********************************************...more >>

Problem when updating table with auto-id
Posted by Duong Nguyen at 9/26/2006 8:42:40 PM
Hello, I have table with auto-id. Binding to a datagridview. One interesting moment: - the first time I run the application, I type some rows(in datagridview), and press onto Update (call method update of the tableAdapter). I got the error message: record with the Id = 1 already existed. I h...more >>

bind then unbind
Posted by Grady Morgan at 9/26/2006 3:18:34 PM
I have a series of controls (textboxes, checkboxes, and dropdowns) which I am binding to a list of variables. Each control is assigned at design time to a specific variable (by key). When that control's variable does not exist in the variable list, I remove the control's bindings and hide the ...more >>

DataGrid not using TableStyle!!
Posted by craig via DotNetMonster.com at 9/26/2006 1:40:31 PM
I know that there is something stupid here, but I am pulling my hair out trying to find it, Please help!!. I have a Form that, with various Tab Pages, has 6 DataGrids. 5 of these DataGrids are using the defined table style and one won't. I can't find anything different between them. One tha...more >>

DataRow being edited not added to DataTable/DataSet
Posted by Arif at 9/26/2006 3:59:02 AM
Hi all, I see that if I edit a data-row and I don’t move to next data-row using data-grid then that row is not added to the data-table and therefore dataset.GetChanges() returns null and no data is pushed back to the data-source. //MessageBox.Show("to lost focus of dgProducts"); thi...more >>

For columns not defined as System.String, the only valid value is (Throw exception).
Posted by Rob Dob at 9/25/2006 4:39:08 PM
I am trying to set the NullValue within the Column properties of my Dataset in VS2005. The DataType is a System.DateTime. and when I try and change it from "(Throw Exception)" I get the following error: For columns not defined as System.String, the only valid value is (Throw exception). ...more >>



datagridview tag value
Posted by jvCoach at 9/25/2006 7:05:37 AM
I'm working with vb.net 2005. I have a class that i've loaded up with my data. Then created a datasource off the class. I load up the datagridview with data from a class.. all this is working fine. I've got data. My problem is with the tag on the datagridview. I've gone in and bound it to ...more >>

DataGridView object within a collection from web services
Posted by Liming at 9/24/2006 10:32:51 PM
Hi, I have an object within a collection. This object has an attribute that I need to bind to a datagridview column. I saw this thread http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.databinding/browse_thread/thread/f92965be386f3a74 which described the need...more >>

How to do batch-update from DataGrid?
Posted by Duong Nguyen at 9/23/2006 12:00:00 AM
Hello! I have 2 tables: Products (ProductID, ProductName) and Inventory(ProductID, Qty). I must display table Inventory in DataGrid (like in Excel) in order to user can working with it (input Qty for each Product). In order to the sheet look more friendly, I make o view Inventory_View( Produc...more >>

Binding ID column from helper table!!!
Posted by Niyazi at 9/22/2006 12:19:36 PM
Hi, I am not sure if the correct format on my Subject line but I am having problem that I find very difficult sleep last 2 days. I have a CustomerTable, ProductTable and OrderTable in my SQL Server 2000. I create and Order Form that I can enter new order or search order by Product, Custome...more >>

Why do I have to redo databinding when I pass a BindingSource from one form to another..
Posted by Rob Dob at 9/21/2006 10:35:42 PM
When I pass a BindingSource from Form1 to Form 2 via the constructor I need to manually rebind all my once databound fields.. Why is this.. I also tried ResetBindings() and this doesn't work either.. Please refer to: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=92942&SiteID=1 ...more >>

How do I share a BindingSource between Winforms.
Posted by Rob Dob at 9/21/2006 4:18:16 PM
Hi, I have two forms within a c# winform app, one form contains a datagridview bound to a binding source, the other form contains a detailed view of that same binding source. what I am trying to do is pass the binding source from form one to form two within the contructor, as shown below,...more >>

Databinding to list of nested class declarations
Posted by Jonny Bergdahl at 9/21/2006 2:31:02 AM
I have a problem databind a ListBox to an array of objects defined as a nested class. The problem is that instead of displaying the text of the field, it displays the string "<namespace>.NestedTestClass+ProductItem", which as far as I can tell is the default value returned by ToString() of the...more >>

Access relationships & dataset wizard
Posted by YojoaDon at 9/20/2006 12:49:02 PM
I have a minor issue with creating a dataset from an Access DB in VB2005. My Access DB has table-relationships going four tables deep. That is, the key field of table one has a one-to-many relationship with a field in table two. The key of table two has a one-to-many relationship with a field ...more >>

Databindings - label doesn't update automatically when datasource changes
Posted by moongirl at 9/19/2006 1:35:11 AM
Hi, I'm fairly new to databindings and trying to get my head round how it works. We are developing a windows application which references a dll which is a custom object, Meeting, and the Meeting object contains a list of 'Races', i.e. List<Race>. The Meeting object is defined as a datasource (m...more >>

Databinding PictureBox Image in JPEG format
Posted by Jeronimo Bertran at 9/18/2006 6:27:25 PM
Hi, I wrote an applicartion that uses databinding to retrieve and store images from a database to a PictureBox. It seems that the databinding is storing the images in BMP format and I need to store them using JPG format.... I know that from the PictureBox I can save to a byte[] in JPG fo...more >>

Forcing DataGridView to repaint a row/disabling a row
Posted by Sam Carleton at 9/18/2006 7:37:04 AM
I have a datagridview that is bound to a datasource. The under lying data is not from a database, but biz objects. The first colume (InUse) is a check box to determine if the rest of the row is enabled. When the row is not in use, it is grayed out in the CellFormatting event. After the user c...more >>

Problem: Master / Detail + DataRelation + DataView
Posted by Arif at 9/17/2006 4:38:02 AM
Hi all, Testing with Database : Nortwind Master Table : Customers Detail Table : Orders DataRelation : relCustomersOrders On Form_Load, DataAdapter fills the dataset with above two table and creates a DataRelation. Everything is OK. When I click on a row of MasterGrid(Customers...more >>

Focus remains locked to masked textbox
Posted by AlBruAn at 9/16/2006 3:15:02 AM
I have a masked textbox bound to a class in my business objects layer that displays the original value and allows me to tab to the other controls on my form. However, if I attempt to modify the value, it refuses to relinquish focus so I can tab to another control. The MaskInputRejected metho...more >>

Moving items within a ListBox/DataView
Posted by SparkPlug at 9/15/2006 7:39:02 AM
I am writing an application (code snippet below) that contains a ListBox control bound to a DataView (consisting of a single DataTable which is part of larger DataSet). The user should be able to click on buttons that will move list items either up or down in the order that they appear in ...more >>

UserContol and DataBinding
Posted by Kyle Jedrusiak at 9/13/2006 4:14:45 PM
On a form we have a TextBox. It's Text property is data bound to a field in a data source. When you get the data from the database, the TextBox shows the data properly. When you change the text and then hit tab, the changes are written back to the bound field. We have a UserControl...more >>

VB to C# issue
Posted by Arvi at 9/12/2006 3:41:22 PM
Hi, im converting a VB web app to a C#. i have problem with the following line ds.Tables[0].Rows[ind].Item["taskid"] ERROR - 'System.Data.DataRow' does not contain a definition for 'Item' whats the alternate that i can use? please let me know Thanks ...more >>

Behavior of IBindingList's EndNew and CancelNew
Posted by Sam Carleton at 9/11/2006 5:44:44 AM
Hay Microsoft, I am trying to implement an advanced BindingList, one that supports adding and deleted rows while filtered. I am having a bear of a time making heads or tails of the rules for when EndNew() and CancelNew() are called. I have gone ahead and written a test program to see when they...more >>

binding update mode
Posted by George Varelas at 9/11/2006 12:00:00 AM
Hi. Can anyone tell me how can I access the property "DataSourceUpdateMode". The problem is that I have a DatagridView control binded to a DataSet and I don't want to update the datasource every time the row is changed after the value of a cell has changed. I want to update manually through my...more >>

My user's setting doesn't stick to next run
Posted by Juan Dent at 9/7/2006 5:55:03 PM
Hi, I created a Windows forms app with a user setting of type Color. I then bound that to the BackColor property of a button. At run time the user may choose a new color for the BackColor and also sets the user setting. Yet, next time I run the app, the initial back color is teh default and...more >>

C# FTP Client
Posted by Arvi at 9/7/2006 9:41:22 AM
Hi, i need to write a application which gets the parameter of a file name and reads the file. the file has a list of paramters like ftp name, username, password, passivemode, etc and then it has to do a ftp transaction depending on the content of a file. is it possible? or someone ha...more >>

Displaying DateTime columns in DataGridView in custom format?
Posted by pedestrian via DotNetMonster.com at 9/6/2006 11:58:17 AM
I create a WinForm app with some DataGridView controls using VB2005. I have a dataTable(dt1) contains, among other, some date columns. However, due to locally we represent date as dd/MM/yyyy format, I have written an additional function to create yet another dataTable (dt2) to replace the tho...more >>

BindingList, one source, two different views
Posted by Sam Carleton at 9/6/2006 10:03:44 AM
I have status coming in from somewhere that will be displayed in multiple windows. Each window can be set to be filtered in a different way from the other windows. How do I implement this with DataBinding? Here is what I have: IStatus --> interface to the status object BindingList<IStatus...more >>

DataBinding a TextBox
Posted by Memphis at 9/6/2006 7:25:01 AM
(VB 2005 - Windows XP Pro - sp2) The following will Bind and then Set the default value. I step thru the code and everything appears to work fine, meaning the Default value is set to 22. When the form does load the default value is set back to 0 (zero). Something so simple is driving me ...more >>

Where is DataGrid in VS2005?
Posted by pedestrian via DotNetMonster.com at 9/2/2006 12:00:00 AM
I'm using DataGridView to display data all this while... I read from the forum and found DataGrid is popular, may I know is it a component like DataGridView? where is it located in VS2005? I couldn't find it in toolbox... Thanks... -- Regards, Pedestrian, Penang. Message posted via Do...more >>


DevelopmentNow Blog