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

Filter by week: 1 2 3 4 5

Using Transaction Scope
Posted by AnikSol at 10/31/2006 10:53:22 PM
Hi, VB 2005 Prof, SQL server 2005, Windows application - I am using transaction scope and within this scope I am passing multiple SQL statements to the command.text On executing, all is well. But noticed that in case there is SQL server time out, then the transaction doesn't fail. S...more >>


Binding to indexed property
Posted by David Clegg at 10/31/2006 5:48:15 PM
I am attempting to data bind to a custom collection class (ReportDataRowCollection) which contains a list of custom objects (ReportDataRow) which in turn exposes a list of custom objects (ReportDataField) via an indexed property which takes a string parameter to identify the ReportDataField inst...more >>

VS 2005 TS Opens a form in changed state?!
Posted by Leon_Amirreza at 10/31/2006 12:00:00 AM
When I double click the form icon in the solution Explorer It Opens the form with an * in its name tab (and indicates that the form has been changed since last save action) HUH ?!?!? I hadnt had even a chance to change somthing Any1 knows what is wrong and how to solve it?!?! ...more >>

BMB.CurrentChanged gets fired just once or twice?!
Posted by Leon_Amirreza at 10/31/2006 12:00:00 AM
I have installed a hanlder for this event: this.BindingContext[dataSetCurriculumsCourses, "TableInstitutes"].CurrentChanged ..... void FormCurriculumsCoursesInstitutes_CurrentItemChanged(object sender, EventArgs e) { this.Text += "1"; } at runtime just "11" will appeare in t...more >>

HasChanges() focus and EndCurrentEdit()
Posted by jarb at 10/30/2006 5:41:55 PM
..Net v1.1 I've seen several posts on this subject but can't find a solid answer. I have a form with data bound controls. When the user chooses a menu command I would like to call dataadapter.Update( dataset ) and send the form data to the database IF NECESSARY. So I tried calling dataset....more >>

What event can I use on a binding action?
Posted by Jamie Risk at 10/30/2006 11:40:57 AM
I've got a comboBox bound to an object in my code. Is there an event I can hook when the object is updated? I can break on the "set mydata = value;" but I'm not clever enough to know what event triggered that call. On my form I have a comboBox and an numericUpDown (spinbox) display. ...more >>

VB 2005 Insert records into multiple tables
Posted by AnikSol at 10/29/2006 12:00:00 AM
Hi All, Not sure if this is the right forum to post this! VB 2005 Prof, SQL server 2005, Windows application Scenario: In a winform application, using SQL server authentication method (not windows authentication), we have a text/binary file containing multiple SQL statements (insert,updat...more >>

How do I change a value of a DataTable cell in a DataSet? (C#)
Posted by Pavel Maly at 10/28/2006 3:46:37 PM
Hello everyone, as a beginner I've encountered a problem while trying to change a value inside the DataSet. After I call dataSet.Tables["tbl"].Rows[0].ItemArray.SetValue("something", colIdx); the value in the row 0 and column colIdx of the DataTable "tbl" doesn't get changed. The thing...more >>



Is there a better way to bind a listbox (combBox)?
Posted by Jamie Risk at 10/27/2006 1:50:01 PM
I'd like to bind a combo box control to an object. i.e. bind an index number for an array of display strings to my data object. I've got something that works as far as I've tested it, but it has to be an overly convoluted method. I'd really appreciate a more streamlined method to implemen...more >>

BindingSource and RaiseListChangedEvents
Posted by Mark Atkinson at 10/27/2006 8:53:03 AM
I'm trying to bind my winform controls to a BindingSource instead of a DataView and I'm setting the DataView as the BindingSource's DataSource property. My main reason for binding to the Bindingsource instead of the DataView directly is to take advantage of the RaiseListChangedEvents boolean...more >>

how to control Delete Method?
Posted by Duong Nguyen at 10/26/2006 6:45:14 PM
Hello! I have 2 tables Products (ProductID,ProductName, Del) and Sale(id, productID, qty, price) Del setted to 1 if user deletes this product. I have DataGridView and a BindingNavigator which binds to this table. How can I control the Delete Method of the productsBindingSource everytime when...more >>

How can I bind a control to an object declared at run time?
Posted by Jamie Risk at 10/26/2006 3:44:17 PM
I'm so lost. This has to be the 20th attempt at writing this posting. * I have a form with various controls. * I have an object with associated properties (accessible with get/set type of interface). * I'd like to have the controls manipulate the properties of the object...more >>

Simple data binding question
Posted by Dmitry Nogin at 10/26/2006 2:33:04 PM
Hi, I tried to databind my object to the TextBox control: =20 textBox1.DataBindings.Add( new Binding("Text", new Test(), "Text")); =20 The exception message was: {"Cannot bind to the property or column Text = on the DataSource.\r\nParameter name: dataMember"} =20 My datasour...more >>

Bound DataGridView with column decimal
Posted by AnikSol at 10/26/2006 12:00:00 AM
Hi All, Ref: VB 2005 Prof, SQL Server 2005 We have a bound datagridview which has a column (say colidx = 1) whose datatype is decimal. The db allows null values for this column. If a user enters a value in this cell and tries to cancel his input by using the backspace key ( meaning the ...more >>

Default value of a GUID field?!
Posted by Leon_Amirreza at 10/26/2006 12:00:00 AM
I have a column named "ID" and its type is "uniqueidentifier" in SQL Server 2005 Express. this column is the primary key and its default value is "newid()" in SQL Server. I have generated a DataSet in C# that has this column but its default value is DBNull what can I do to make the default...more >>

Binding a DataSet with multiple takes to a BindingNavigator
Posted by mordock32 NO[at]SPAM hotmail.com at 10/25/2006 2:43:26 PM
I have a DataSet, let's say with two tables: one for jobs, one for employees. I want to do something like this: BindingSource bs = new BindingSource(); bs.DataSource = ds; nav.BindingSource = bs; However, when I try to do that, I get 1 of 1 records when there are around 300 records in th...more >>

Determining which object has been removed from a BindingList
Posted by Andy Paterson at 10/24/2006 10:52:16 PM
I have a class that inherits from BindingList<T>. It raises the ListChanged event. When an object is removed from the list, how do I figure out which object was removed? ListChanged e.NewIndex points to the object that is now in the position where the removed one was. But I want to do so...more >>

ComboBox - Losing binding
Posted by s26f84 NO[at]SPAM gmail.com at 10/24/2006 2:59:10 PM
Hey Guys&Gals my combo box is never empty it always have the text from the first member of the table... Plz help my code: this.cbo.DataSource = SearchData.Tables["Name"]; this.cbo.ValueMember = "ID"; this.cbo.DisplayMember = "Name"; this.cbo.SelectedIndex = -1; this.cb...more >>

Master/Detail Relationship
Posted by Chuck P at 10/23/2006 2:31:02 PM
I have a dataset (dsIntake) in the designer with a master/detail relation. The relation is marked with Relation Only and Nested Relation In the designer code it is: this.relationIntakes_vwIntakeRelatedCases = new System.Data.DataRelation("Intakes_vwIntakeRelatedCases", new System.Data.Data...more >>

BindingSource.AddNew() locks TextBox.Text property??
Posted by tomse at 10/23/2006 10:33:03 AM
Hello, I have simple databinding of textbox to bindingsource(bound to dataset), created in form constructor: public Form3(string xyz) { InitializeComponent(); Program.bindingSource.AddNew(); textBox1.DataBindings.Add("Text", Program.bindingSourc...more >>

VS 2005 Dataset and DataAdapter
Posted by Andrzej at 10/22/2006 11:01:26 AM
Is it possible to add a Dataset using a control in Visual Studio 2005? I need to add a Dataset control, or some other object that will show up in the GUI as a "Data Source" for data-binding. The reason I need a DataSet is for its multiple-table capabilities - one of the custom controls I am using ...more >>

Binding a textbox to a nullable datatype.
Posted by markk NO[at]SPAM nait.ca at 10/22/2006 10:41:27 AM
I am wondering if there is a better solution, than the one I came up with... I am binding a textbox to a nullable float (float?) and want the ability for the user to leave the textbox blank, indicating that it is null. If you do not alter the behavior of the textbox, the user, when attempting...more >>

bound combobox default value
Posted by Chuck P at 10/20/2006 7:36:01 AM
I have a combobox (DropDownList style) that I filled with objects that have two properites Display and Value. The combobox is bound to a binding source this.cbxStaff.DataBindings.Add("SelectedValue", this.intakesBindingSource, "StaffID"); In the form load I have ComboBox_Load<int>(cbxS...more >>

current value
Posted by Paulo Silva at 10/19/2006 9:24:51 PM
I have one BindSource, one table adapter and one GridView. Everthing is working fine, my doubt is: How to read the values of the current row, for example, the row that is selected on a gridview or on a bindingnavigator? tanks ...more >>

Selected GridViewRow isn't "Clicked"
Posted by Ross Culver at 10/18/2006 5:19:59 PM
I have a databound datagridview (VS2K5) with hundreds of rows. I'm trying to allow users to search for a given row and once selected the fields at the top of the form will populate with the rows records. This works fine when you click the gridview rows manually and I can easily programmati...more >>

Binding a DataGridViewComboBoxColumn
Posted by mordock32 NO[at]SPAM hotmail.com at 10/18/2006 2:03:43 PM
What I want to do is pull a list of name/value pairs from a database and populate the display and value members of a DataGridViewComboBoxColumn with it. However, I also want to bind the DataGridView as a whole to another query from the database, which would set the selected item for the combo bo...more >>

DataGridView_CellLeave() strange behaviour
Posted by archana at 10/18/2006 12:33:08 PM
i want to edit my previous post to give u clear clue about my problem. i am having datagridview in my windows form(vb.net 2.0),i am inserting the data(records)in the cells of the datagridview. After finishing the insertion of data into the rows of datagridview ,i finally want to save the all row...more >>

DataGridView_CellLeave
Posted by archana at 10/18/2006 5:04:10 AM
i am using datagridview in my project and try to retrieve the value of the selected row on cell leave.but it gives me null value of the cell of the selected row even though i have value in my cell.i could not find out the solution. please suggest me and suggest where my code is going wrong. ...more >>

Catch Retrieve ( each Row )
Posted by Marcus Kraus at 10/17/2006 4:08:39 PM
Hi there, again a newbie question but again, I uses PowerBuilder from Sybase and with this tool we could handle a RetrieveRow event which was triggerd for each Row loaded from the Database... Can U somehow do this with ADO and C#... So i can Display a Statubar with information like "Loading...more >>

BindingSource.EndEdit() doesn't change rowstate
Posted by Muskito at 10/17/2006 12:21:41 PM
Hi, VB.NET 2.0, Visual Studio 2005, Form Data Bindings I'm using a Typed dataset with several tables on my form, and also using a BindingSource Object to bind the controls on the form to it. The Typed dataset is used as a datasource and a table from the Typed DS is used as a DataMember. ...more >>

Mixing automatic and custom error notifications...
Posted by Nathan Baulch at 10/17/2006 12:39:54 AM
I need to mix automatic (ErrorProvider.DataSource) and custom = (Control.Validating) error notification on my form. Unfortunately it doesn't look like they work together properly. In the minimal example below, I want to be notified if either txtString = is empty (custom error) or txtInteger does...more >>

Data Column Expressions
Posted by AnikSol at 10/17/2006 12:31:37 AM
Hi, In VB 2005, using SQL server 2005 I have a typed dataset. One of the tableadpaters, I have created a datacolumn with datatype as string and set the expression as follows: iif(Typeid = 1, [datecolumnx],[int columny]) .... Typeid -- is the field who value is being evaluated and true part...more >>

How can I databind to this property?
Posted by John Faris at 10/16/2006 9:15:18 PM
I have created a class DelimitedList<T> which inherits from BindingList<T>. I also have a custom business object that has a property defined as type DelimitedList<int>. I then created a UserControl that has a property of this same type. I added the following attribute to this property. [B...more >>

Filtered/sorted Datagrid
Posted by s26f84 NO[at]SPAM gmail.com at 10/15/2006 1:12:09 PM
Hey Guys Alot of articles and alot of stuff still no answer. Please help me on this one. I need to get data out of a filterred selected row !!! ... this is how my code looks like.... On load: dv = SearchData.DefaultView; if (SearchData.Rows.Count >= 1) { grd.DataSource = dv; ...more >>

How to Control RowState
Posted by Marcus Kraus at 10/14/2006 6:17:15 PM
Hi everybody, can I somehow ( Function call or else ) set the RowState of the Row to an desired / spezific State ?? I know that .AcceptChanges() and .EndEdit() controls the State but i want to change a specific Row to an specific State..... ( e.g Insert at Runtime and than set the State to ...more >>

ListBox and DataSource not refreshing
Posted by David Haynes at 10/13/2006 5:22:11 PM
C#/VS2005/.NET 2.0 I have a ListBox that is using an Object as its DataSource. The Object has a method - List - that returns a List<xxx> Collection. The Object also has a method - Add - which does a List.Add(xxx) on the List. My problem is that when I add something using Object.Add(), I do n...more >>

DataGridView doesn't refresh
Posted by AH at 10/10/2006 7:43:01 PM
Hi, I have a problem with datagridview which is binded to a datatable. When a datarow is added to the datatable by another thread. Datagridview doesn't show the new datarow until I call datagridview.refresh() or sort the data by clicking the column header. I guess it may be due ...more >>

DateTimePicker in a BindingNavigator?
Posted by Harald at 10/10/2006 5:27:46 PM
Hi, unfortunately there is no DateTimePicker control available to add to a tool strip (not in the add element drop down list). Is it possible to add such a control another way? How to do that? Thanks for any help! Regards, Harald ...more >>

Does anyone find DataGridView to be kinda slow?
Posted by 0to60 at 10/10/2006 3:40:15 PM
I find this control to be awfully slow. I throw it on a form, and then set DataSource to a data table (my test table has maybe 500 rows and 10 columns), then set Anchor to all four places. At runtime, painting is very sluggish. Resizing the form is slow. Are there some properties I can set t...more >>

DataGridView Summary Row?
Posted by AnikSol at 10/7/2006 12:00:00 AM
Hi All, In VB 2005, typed dataset, Bound Datagridview, winforms Is it possible to add a row to a databound datagridview to show the sum of the cells for that particular column? Meaning - there are 15 columns and say 10 rows We need to have a 11th row which would show the sum of the cells f...more >>

DataGridView
Posted by Erencan SAÐIROÐLU at 10/6/2006 5:38:21 PM
Hi To All, I've a typed dataset and datagridview. I add a new row typed dataset but datagridview not refresh. I've unchecked datagridview "enable adding" "enable editing" on the grid when i design mode. my code is here... KeyGeneratorDataSet ds = new KeyGeneratorDataSet(); ...more >>

Mapping from DataGrid rows to DataTable rows ...
Posted by Paul_Madden via DotNetMonster.com at 10/6/2006 12:00:00 AM
I have the "classic" data binding scenario. DataTable -> DataView -> DataGrid. Essentially I need to be able to iterate over the rows as displayed within the DataGrid, and to link back to the corresponding row swithin the DataTable data source. How do I link from DataGrid displayed rowm to...more >>

Changed data in BindingSource is not updated?
Posted by Johan Machielse at 10/4/2006 3:57:02 AM
Dear reader, Situation I have created a Master-Detail solution which works very good (thanks to the help of this newsgroup). In the Detail section I have textboxes wherein the user can change data; this data has to be saved to the database using the update method. Problem When I debug ...more >>

Master-Detail: Use TextBox as Child
Posted by Johan Machielse at 10/3/2006 2:25:02 AM
Dear Reader, Situation: - customers table (bugs in code example) - order table (solutions in code example) Problem I'd like to bind the customers table with simple text boxes and navigate through them with buttons; I already build this and it works! I'd also like to bind the orders tabl...more >>

Databinding, DataGridView and MaskedTextBox question
Posted by AlBruAn at 10/2/2006 1:05:02 PM
I have a form containing a MaskedTextBox and a DataGridView controls bound to two business objects. The DataGridView is bound to a read-only list of drawing categories to allow the user to see what has been previously entered. The MaskedTextBox is used to enter a new drawing category code an...more >>


DevelopmentNow Blog