Generally, working directly with the visual elements is not recommended and you should instead work with the data items when performing such styling logic. As the RadGridView uses UI Virtualization the visual elements, such as rows and cells, are reused and this might lead to undesired behavior.
If you would specify why you need to use this exact approach, maybe I can offer you another solution based on your specific requirements.
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer
and share your thoughts.