Welcome to the Xceed Community | Help
Community Search  

Persistent row background color is lost on sorting

Sort Posts: Previous Next
  •  12-04-2008, 10:19 AM Post no. 17346

    Persistent row background color is lost on sorting

    Hello all,

    I'm relatively new to the WPF DataGrid, but I really like it so far.  I'm having a problem though with maintaining row background color.  I want to set the row background color based on a column value in the row.  I've found where I can set the row color with the PropertyChanged event, but it seems I can only set it when the user enters or exits a row.  I've also noticed that if the user sorts the grid (by clicking the column header), all row coloring reverts back to the original values.

    My question is two fold:

      1.  Is there a better way to initialize the row color based on column values when the grid is loaded rather than when the user enters or exists the row?

      2.  How can I maintain the row color when the user sorts the contents in the grid?

    Thanks in advance,

    Steve

View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.