Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
120
Format 1 Row differently
posted

Hi there

Does anyone know if it is possible to format 1 row a different color than the rest of the grid? If yes, can you please explain how to achieve this?

Thank you

Parents
No Data
Reply
  • 21382
    posted

    You can set the Style.BackColor for a row based on a value.

     

            protected void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)
            {
                if ((int)e.Row.Cells[0].Value == 2)
                {
                    e.Row.Style.BackColor = System.Drawing.Color.Red;
                }
            }

Children