Hi,
I just want to know how to change the background colour for a particular cell in XamlGrid. I want to do this in Code behind (C#). Could anyone please assist on this.
Many thanks in advance
Florence
Hi Yanko,
Thanks for this sample.. Helped me a lot!!
Regards,
Poornima
It works fine, but when i use FieldChoser, to hide/unhide columns, the highlight goes off, how to keep the cell highlight color until i close the application.
I also fall across a similar problem with you, it puzzled me for several days.
But now I figured it out !!
It is quite easily to do this.
You can just set RecordContainerGenerationMode to PreLoad in XamDataGrid !!
here is for you reference:http://forums.infragistics.com/forums/p/29380/128390.aspx
ymanolov said: Hi RobertBrower, In answer to your question - "How can I make it so that the control remembers that the changed cell's styleeven after it is scrolled out then back into view ?" a great solution to the issue was suggested by Joe Dour and Andrew Smith. Special thanks to both of them for the suggested solution. The solution 1. Use the Tag property on the Cell, so in the CellUpdated event set Cell.Tag to a Boolean true . ....
Hi RobertBrower,
In answer to your question - "How can I make it so that the control remembers that the changed cell's styleeven after it is scrolled out then back into view ?" a great solution to the issue was suggested by Joe Dour and Andrew Smith. Special thanks to both of them for the suggested solution.
The solution
1. Use the Tag property on the Cell, so in the CellUpdated event set Cell.Tag to a Boolean true .
....
Although at first a good solution, it creates a big memory leak, since the control refers to the cell, and the cell contains the control ... A better approach is to use an attached property that you set to true when records come into view, using an override for OnRecordsInViewChanged. In Xaml you can then act on this attached property eg using a multibinding converter.
Hello Bijaya,
In which event are you trying to get the CellValuePresenter?
Please note that you will be able to get the CellValuePresenter, or any king of presenter for that matter, only it it is visible and generated.