Is it possible to combine both conditional formatting and style triggers in the XamGrid?
I have a grid bound to a list of data items. What I want to do is change the background and foreground colours of a particular cell based on some value from the underlying data item (which is not the value of the actual cell, so I don't think I can use a conditional formatting rule), and apply a data bar (via conditional formatting) based on the value of the cell. I can make either of these work easily enough in isolation, but if I combine the two, it seems that the data bar conditional formatting rule overwrites my style triggers. My style is targetting the ConditionalFormattingCellControl... How can I combine the two?
Hello gregorach,
You can use Converters to change the Cell's Background and Foreground. You can use them with DataBar. I have prepared a small sample which illustrates this approach.
If you have further questions concerning this matter please let me know.
Hi Nick
Thanks for your response, but unfortunately this doesn't seem to be working in my application... It's definitely hitting my converter, but it doesn't seem to make any difference to the cell style, even if I remove the databar. I can't see where the problem could lie...
Unfortunately, I'm going to have to de-prioritise this for a bit as I more pressing matters to attend to. Thanks for your help so far though.
Thank you for your feedback.
The best option in this scenario would be if you could prepare a small isolated sample which reproduces the issue and send it as an attached file. This will help in debugging, testing and to observe the behavior you are describing.
You can always update this forum thread in the future or create a new one with the described sample.
Yeah, that's not a bad idea... I wouldn't be surprised if trying to isolate the issue actually helps me fix it. Unfortunately I'm far too busy on other stuff right now...
Hello,
If you are able to isolate the behavior at some point, you can always update this forum thread or create a new one with a new sample.
I managed to find some time to pick this up again today, and it's now working fine. I don't know what I missed the first time, but there you go... Thanks again!
Hello, Thank you for your feedback.
I am glad to know, you were able to you achieve the functionality you were looking for. If you require any further assistance on this matter, please let me know.