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
1785
UltraGrid column style not inherited by cells
posted

I am so frustrated with the UltraGrid right now...  I have a grid, one band, that has five columns that need to have their STYLE set to DropDownList. I've set the style on the columns but for some reason the cells aren't inheriting that setting.  When the grid is displayed, the add row has those five cells as regular editable text cells versus a drop-down list.

In the InitializeRow event I added this debugging code:

MsgBox(grid.DisplayLayout.Bands(0).Columns("col1").Style.ToString)
MsgBox(grid.DisplayLayout.Bands(0).Columns("col2").Style.ToString)
...

the result of these is "DropDownList"

plus this code:

MsgBox(e.Row.Cells("col1").Style.ToString)
MsgBox(e.Row.Cells("col2").Style.ToString)

the result of these is "Default".

So during InitializeRow the grid sees the styles of the columns as DropDownList but the actually cells in the add row are Default style.

Any idea why this might be happening?

Parents
No Data
Reply
  • 1785
    Offline posted

    More info...  these columns have their ValueList set to an actual VL.

    In InitializeRow, I just tried this:

    e.Row.Cells("col1").Style = ColumnStyle.DropDownList
    e.Row.Cells("col2").Style = ColumnStyle.DropDownList
    ...
    MsgBox(e.Row.Cells("col1").Style.ToString)
    MsgBox(e.Row.Cells("col2").Style.ToString)
    ...

    The message boxes display "DropDownList" but the cells do not have a drop-down and are basically editable text cells.  Something is preventing these cells from taking on the drop-down list style and I don't know why...

Children