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
785
Cell Background Color Based on Data
posted

Hello All,

I'd like to take one more crack at my problem of not being able to set a cell's background color based on its data. This thread continues "Unexpected Data Type in Value Converter for CellValiuePresenters".

The attached solution duplicates the problem in as simple  manner as possible.

Thanks,
Dave

 

  • 9694
    posted

    Hello,

    I apologize that no one has yet answered this post. We were inundated with more posts than we had resources to cover. Since that time we have been adding people to the task of making sure every post gets a reply from an Infragistics employee.

    I looked at your sample. The problem is that the CellValuePresenter is not initilized because a template is just that, a template to be applied to the creation of another object. At template application time, the template and it's triggers and resources are applied.

    Perhaps a better approach would be to provide a DataTrigger that triggers the Brush change based on the data. Another approach would be to pass data into the converter or a element in the template. Passing the template itself won't work.

    Thank you!