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
100
Changing a cells .CellStyle in InitializeRow
posted

It appears this may only be a Win Forms capability, but is there ANY way to change the cells style row by row?? 

i.e.     Question                                                                              Answer

          Do you have a car?                                                           <checkbox>

         what is the model?                                                           <dropdown>

         what year?                                                                          <text/int>

The grid I am working with has an unlimited # of questions possible and I can determine the type of column to display based on the db I created. This works fine in the Win Forms world, but I need to translate this to the Web world :)

 

Parents
No Data
Reply
  • 180
    posted

    After the grid is bound you can loop through each row in the following manor:

    For Each row as Infragistics.WebUI.UltraWebGrid.UltraGridRow In grid.Rows

      row.Cells(the index).Style.BackColor = Color.Red

    - or -

      row.Style.BackColor = Color.Red

    Next

    You might need to be careful of CSS rules that are getting applied to the row as this might override the color you set here.

Children
No Data