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
3160
How to add a converter to a dynamically added column
posted

The attached example shows two XamDataGrids.
The first grid works (with exceptions noted below) and serves to illustrate what I want to accomplish with the second grid.

Note that the second data grid handles the FieldLayoutInitialized event and adds columns on the fly.
When a column is added, a multibinding is added to the field definition. 
The multibinding specifies a converter (CouponColumnConverter) that allows the field to calculate its value.

I have two questions related to this code:
1.) When the refresh button is clicked the Accounts list is re-populated with new data.
Before the grid can bind, MinAccountBalance and MaxAccountBalance must be computed however the grid attempts to bind too early causing the heatMap converter to crash.
How do I prevent the grid from binding?

2.) I need to implement the HeatMap converter for each column that is added to the second grid.  How do I  do that?

Thanks,

Sam
 

HeatMapProblem.zip