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
275
Cell Editor
posted

Hi,

I have a complex class as a field datasource in a xamDataGrid.

I also created a custom CellValuePresenter style where I define the ControlTemplate  as a Label which is bound to the "value" property of the original class.

This Template contains several Style Triggers of it's own to show all the information I need (Changes background color, text font, etc based on certain properties of the original class as well).

Everything is working fine, except now I need to make these values editable from the grid.

Is there a way to define an editor (in this case xamNumericEditor) in the CellValuePresenterTemplate that would only show up when the cell enters edit mode and allow me to edit the value property in my underlying class?

Thanks,

Ricardo

Parents
  • 275
    Offline posted

    I changed my control template from a Label to a XamNumericEditor and it almost worked.

    I can now edit the content of the cells when I click on them but can't do it without using the mouse click.

    "Enter" or "F2" don't work. How can I make it editable from the keyboard as soon as the cell gets focus, like excel?

    Thanks,

    Ricardo

Reply Children