There three different DataGrids (one for WinForms, ASP and WPF), but only WPF's DataGrid has a ItemsSource property so I asume you use WPF.
And in WPF the one rule about accesing the UI from Code is: Don't. You are on the wrong track!
What you try to do should be done with StyleTriggers, a ItemTempalte or directly on the ItemsSource.
Trying to access the UI is the single most common mistake for people comming from other UI Technologies and whatever you try to do, there is a 99% chance to do this with code and the actuall collection. Now is the perfect time for you to unlearn this old
technique and use the ones WPF is designed for.
Also, WPF has it's own forum:
http://social.msdn.microsoft.com/Forums/en-US/wpf/threads
Let's talk about MVVM: http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/b1a8bf14-4acd-4d77-9df8-bdb95b02dbe2 Please mark post as helpfull and answers respectively.