Amir Tohidi
7/5/2007 4:58:00 PM
Thanks Martin & Milosz - your comments helped me solve the problem.
"Milosz Skalecki [MCAD]" wrote:
> Hi there,
>
> Use Row directly. Also make sure you change the value only when it hass been
> added:
>
> protected void table_RowChanged(object sender, DataRowChangeEventArgs e)
> {
> if (e.Action == DataRowAction.Add)
> e.Row[itemIndex] = newValue;
> }
>
> Hope it helps
> --
> Milosz
>
>
> "Amir Tohidi" wrote:
>
> > Sorry, the penultimate paragpraph should read:
> >
> > The line above executes without errors BUT my change is NOT BEING applied to
> > the DataRow!
> >
> >
> > "Amir Tohidi" wrote:
> >
> > > Hi
> > >
> > > I need to trap the insertion of a new row into a DataTable while it is being
> > > filled by a data adaptor. I am trapping the RowChanged event and using the
> > > following syntax to try and modify the row:
> > >
> > > e.Row.ItemArray(index) = newValue
> > >
> > > The line above executes without errors BUT my change is actually applied to
> > > the DataRow!
> > >
> > > What am I doing wrong please?