Hello Guys,

I need to set a default value in the first column of my=20
dataTable.
I tried to do it:

foreach (DataRow rw in tblAdiantamentos.Rows)
{
rw.ItemArray.SetValue("01122003",0);
}
//set datagrid dataSource property
dgAdiantamentos.DataSource =3D tblAdiantamentos;

but when I check values in my dataTable I notice nothing=20
happen (that aren=B4t any changes)

Anybody can help me ?

Tks=20

Jean Carlo
(Brazil)

Re: DataRow - SetValue don´t work by Christopher

Christopher
Mon Oct 27 15:07:13 CST 2003

Hi Jean

Try using one of these

rw.Item[<index>] = 0;
rw.Item["ColumnName"] = 0;

Chris

"Jean" <anonymous@discussions.microsoft.com> wrote in message
news:042501c39c86$59c613d0$a001280a@phx.gbl...
Hello Guys,

I need to set a default value in the first column of my
dataTable.
I tried to do it:

foreach (DataRow rw in tblAdiantamentos.Rows)
{
rw.ItemArray.SetValue("01122003",0);
}
//set datagrid dataSource property
dgAdiantamentos.DataSource = tblAdiantamentos;

but when I check values in my dataTable I notice nothing
happen (that aren´t any changes)

Anybody can help me ?

Tks

Jean Carlo
(Brazil)