Home Forums WPF controls Xceed DataGrid for WPF Image instead of checkbox for bool column

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #26637 |

    I’d like to try and have a column within a grid that shows images/icons instead of a checkbox for it’s bool state. Furthermore I’d also like the user to be able to change the value in the column by clicking on the image and have it turn into the other icon as appropriate without showing a checkbox inbetween and raise an event in the codebehind when this occurs.

    I’ve tried using styles initially but found out I can’t set a style to a particular column only a template. I tried the template approach and ended up with the image displying, but when the user clicks on it a checkbox shows up, furthermore I have no idea how to bind an event through a data template.

    Any suggestions would be appreciated.

    Imported from legacy forums. Posted by Jack2 (had 2054 views)

    Xceed Support
    Post count: 5658

    The CellContentTemplate determines how the content of a cell is displayed when it is not being edited. If you want the CheckBox that appears when a cell is being edited to be displayed as a picture, then you will also need to change the same column’s CellEditor.

    Imported from legacy forums. Posted by Jenny [Xceed] (had 3002 views)

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