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
400
Hidden Cell space
posted

When I hide a cell (i.e. e.Row.Cells[""].Hidden = true) there is a empty space for the hidden cell in the grid. What is this empty space? I want to be able to change the color of the space where the cell is hidden.

Thanks

Parents
  • 69832
    Suggested Answer
    Offline posted

    The empty space is the absence of a CellUIElement. Since cells appear in the foreground with respect to the row area, you can change the color of this area by using the BackColor property of the RowAppearance:

    UltraGrid.DisplayLayout.Override.CellAppearance.BackColor = Color.White;
    UltraGrid.DisplayLayout.Override.RowAppearance.BackColor = Color.Red;

    Note that the reason you have to also set the background color of the CellAppearance is that cells inherit their appearance from rows unless the cell's appearance is explicitly set.

Reply Children