G
Guest
I am trying to iterate through a datagrid using the following code:
private void updateFCA(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
for (int i = 0; i < e.Item.Cells.Count - 1; i ++)
{
if (e.Item.Cells[3].Text == "FCA")
{
e.Item.Cells[3].Text = "FCA";
}
else if (e.Item.Cells[3].Text == "")
{
e.Item.Cells[3].Text = "N";
}
else
{
e.Item.Cells[3].Text = "Y";
}
}
}
Thie iteration does not work as the int i value is not used. How do I alter
the code to fix this problem?
Thanks,
Dave
private void updateFCA(object sender,
System.Web.UI.WebControls.DataGridItemEventArgs e)
{
for (int i = 0; i < e.Item.Cells.Count - 1; i ++)
{
if (e.Item.Cells[3].Text == "FCA")
{
e.Item.Cells[3].Text = "FCA";
}
else if (e.Item.Cells[3].Text == "")
{
e.Item.Cells[3].Text = "N";
}
else
{
e.Item.Cells[3].Text = "Y";
}
}
}
Thie iteration does not work as the int i value is not used. How do I alter
the code to fix this problem?
Thanks,
Dave