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
1255
Problem with new OnDataValueChanged and GroupBy
posted

I have been using the DataValueChanged functionality in 2009.2 XamDatagrid to color the backgrounds of some of the cells in my grid.  Everything works fine until you use GroupBy functionality.  Once you drop a field into the GroupBy area, all the cells lose their color (at least until the next data changed event).  Also, the opposite occurs, if you let all the cells become colored in the GroupBy mode and then drag the field off the GroupBy area all the cells again lose their color.

How can i get the cells to retain their OnDataChangedValue color or how can I can I cause a refresh of the event to recolor them when the background data isn't changing?

Parents
No Data
Reply
  • 1255
    Verified Answer
    Offline posted

    Alex, I saw your comment on losing color while sorting and I tried using the InitializeCellValuePresenter event.  Worked like a charm.  You can use almost the exact same definition in the InitializeCellValuePresenter except you use e.CellValuePresenter.ValueHistory instead of e.ValueHistory.

    Since this event is fundamentally essential for sorting and GroupBy, it should seriously be added to the OnDataValueChanged documentation.

Children
No Data