Home Forums WinForms controls Xceed Grid for WinForms SelectedRows Backcolor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #13728 |

    Hi –

    How can I, in effect, set the back color for the selected rows to transparent? Setting it via pGrid.SelectionBackColor = Color.Transparent does not work as expected. The text values become hidden when rows are selected. I also don’t want to set the SelectionMode to None – I want to keep the selection functionality. Any suggestions?

    Thanks,

    Craig

    Imported from legacy forums. Posted by csperler (had 2854 views)

    User (Old forums)
    Member
    Post count: 23064

    Maybe the text is not hidden, but just has the same color as the background color. Try setting pGrid.SelectionForeColor to a different color.

    Imported from legacy forums. Posted by Tommy (had 149 views)

    User (Old forums)
    Member
    Post count: 23064

    I feel stupid.

    Thanks Tommy, that fixed the problem.

    Unfortunately, it’s created several new problems. Basically, I’m getting unexpected color changes. Essentially, my goal was to set up the grid such that only selected cells are colored differently, not selected rows. So, for example, in a [3×3] grid, if I click on the middle cell, only that cell’s back color changes, as opposed to the entire row’s. If I then control-click the upper middle cell, then only that cell and the middle cell are colored, versus the top two rows. Is there a known/documented way of accomplishing this?

    Thanks again,

    Craig

    Imported from legacy forums. Posted by csperler (had 342 views)

    User (Old forums)
    Member
    Post count: 23064

    The Xceed.Grid.GridControl is a row-based grid control. You can set individual cell properties, but the selection is row-based. Luckily, the grid control is also very extensible. If you want to make the selection of the grid cell-based, you can extend the grid.
    The documentation has some topics on extending Xceed.Grid-classes, and there might also be some examples that do this.

    Imported from legacy forums. Posted by Tommy (had 4016 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.