RE: Textbox and DataRow Status Problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Mike Shupe (meshupe_at_yahoo.com)
Date: 01/26/05


Date: Wed, 26 Jan 2005 23:39:44 GMT

I'm not sure why but if you change the binding to a datarow and then end current edits on that datarow it works...

DataRiw drClient = dsData.Tables[0].Rows[0];
this.txtFirstName.DataBindings.Add(new System.Windows.Forms.Binding("Text", drClient, "FirstName"));

and then...

this.BindingContext[this.drClient].EndCurrentEdit();

Posted via DevelopmentNow Groups
www.developmentnow.com/g
www.developmentnow.com



Relevant Pages

  • "Index was out of range" error when editing DataRow
    ... "Index was out of range" error when editing DataRow ... Our application makes thousands of edits to DataSets without problem, ... changing the row state during the edit: ... DataViewRowState oldState2, DataViewRowState newState2) ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Binding Example
    ... Since drStaff is apparently just an instance of DataRow, ... When you bind to the DataTable, the DataTable has the names of the ... Perhaps somehow i am missing a binding of column names, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Binding Example
    ... Jack Jackson wrote: ... Since drStaff is apparently just an instance of DataRow, ... When you bind to the DataTable, the DataTable has the names of the ... Perhaps somehow i am missing a binding of column names, ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Databinding to user control
    ... Actually, your binding your control to the current DataRow of a DataTable, ... I created a test to see if the RichTextBox control behaved as you ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Use Parent Column in Child?
    ... I am using DataRelations to achieve the nesting in my ASP.NET page but I'm binding to a DataRowView as shown here ... So, when I try and cast Container.DataItem to the DataRow type, it comes back invalid. ... Therefore you know that the DataItem that you're ... Container is giving you in these binding Expressions is a DataRow. ...
    (microsoft.public.dotnet.framework.aspnet.datagridcontrol)