Jump to content
Software FX Community

Format data in one column based on values in another column


RDiehl

Recommended Posts

Try a different event, like Grid Rendering:

protected void Grid1_Rendering(object sender, EventArgs e)

  {

  try

  {

  Color RedColor = Color.Red;

  Color BlueColor = Color.Blue;

  foreach (GridItem Item in Grid1.Items)

  {  

  if (Convert.ToDouble(Item.Cells[0].Text) < 5)

  {

  Item.Style.BackColor = RedColor;

  }

  else

  {

  Item.Style.BackColor = BlueColor;

  }

  }

  }

  finally

  {   }

  }

Let me know if this helps.

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...