Hi everybody.
I have a question. In the code below I'm trying replace cells with a specific value with an empty string, but this step changes also the values in the database table for corresponding cells.
GridViewRowCollection rowCollection = someGridView.Rows;
foreach (GridViewRowInfo info in rowCollection)
{
if (info.Cells["someColumn"].Value.ToString() == "someValue")
{
info.Cells["someColumn"].Value = "";
}
}
How can I avoid such a behavior, without creating another foreach loop in order to restore previous values?
Thanks in advance.
Frank.
I have a question. In the code below I'm trying replace cells with a specific value with an empty string, but this step changes also the values in the database table for corresponding cells.
GridViewRowCollection rowCollection = someGridView.Rows;
foreach (GridViewRowInfo info in rowCollection)
{
if (info.Cells["someColumn"].Value.ToString() == "someValue")
{
info.Cells["someColumn"].Value = "";
}
}
How can I avoid such a behavior, without creating another foreach loop in order to restore previous values?
Thanks in advance.
Frank.