Hello,
I need to customise the WPF grid component so that its cells flash when the displayed value changes.
The behavior I need to achieve is exactly the one showed in the "task manager" sample (http://demos.devexpress.com/DXGridDemos/GridDemo.xbap) for the memory usage column.
I figured out how it works, but the solution is not suitable for 2 reasons:
1. it uses an invisible column to hold each row animation and in my case I need one per cell, not one per row.
2. The animations are not triggered from events, but they are invoked right after setting the values explicitly. My grids are backed by DataTables and the CellValueChanged event is not fired when the change comes from the dataset, as stated into the documentation (http://documentation.devexpress.com/#Silverlight/DevExpressXpfGridGridViewBase_CellValueChangedtopic).
Also, I need to make this behavior automatic since the application uses a lot of grids with lots of fields and it is definitely too much work to implement the animation manually (even by copy-paste) for all of them.
Thank you in advance.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Luca,
We need some time to discuss this problem and check if there is another approach we can suggest. Your patience is greatly appreciated.
Thanks,
Vito
Hi Luca,
First, please accept our sincere apologies for the delay in answering. It took us time to examine this problem.
We have completely examined this issue, but it looks as if there is no general solution. The problem is that in a general case it is impossible to determine that a cell value has been changed. A possible solution is to define CellTemplate and trigger animation when the GridCellData.CellValue property is modified. However, the GridCellData.CellValue property is also modified when you use built-in grid's data processing features, like grouping or sorting, etc. Thus, grid cells will also be flashed when you group or sort data and not when the cell values are actually changed. I suppose this is not the functionality you wish to see.
It appears that the best way to accomplish this task is to introduce additional properties at the data object level (or define unbound columns for this purpose) and modify these properties when you change your "data" properties. This way, you will be able to add triggers for these properties into a column's CellTemplate to start animation when a cell value is modified.
I am attaching a small sample project, which demonstrates the approach I described. Hopefully, it will be of some help.
Thanks,
Vito