Jean,
The reason this doesn't work is that ItemArray returns a copy of the
values in the row, it doesn't return an object where you can set the values
on the row. In order to change the value on a row, you will want to use the
indexer on the row, like this:
// Cycle through all rows.
foreach (DataRow rowExp in tblExport.Rows)
// Set the value of the first column in each row to "false".
rowExp[0] = "false";
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Jean" <an*******@discussions.microsoft.com> wrote in message
news:06****************************@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 rowExp in tblExport.Rows)
{
rowExp.ItemArray.SetValue("false", 0);
}
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)