By IRS Code it will not be dependent on the child support issue. it is based who is the custodial person in terms of whom he has lived with.
Since he is not your child, he has to qualfy for you to claim him as a qualifying relative.
The rules for qualifying relative are:
1. He is not the qualifying child of another person. (it looks like his dad is not because he would have had to have lived with the father at least half the year.) If he lived for more than six months with either parent he would be thieir qualifying child.
2. Your grandson earns less than 3700 dollars a year.
3. You provide more than half your grandson's total support for the year.
4. He can not be filing a joint return with anyone else.
5. He must be a Citizen or Resident Alien of the United States, Canada, or Mexico.
NOTE: a grand child is listed in publication 501 as not being required to have lived with you the entire year. http://www.irs.gov/pub/irs-pdf/p501.pdf